Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3077576rwd; Wed, 14 Jun 2023 10:54:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZGVHahwuACrv1dgiZpkEy5SoAp9SxHxtlm2yDQo8DLvzdv9QjuQ8JAiRbCB7+DuwJzHvr X-Received: by 2002:a17:907:60d3:b0:978:8937:19ba with SMTP id hv19-20020a17090760d300b00978893719bamr17941386ejc.44.1686765247840; Wed, 14 Jun 2023 10:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686765247; cv=none; d=google.com; s=arc-20160816; b=x9y09Q7KJaYhKX8jb+IqS+p0qo8ZuM/0LoOV4U1CISYgRJiYPkTq/XEj5CuqaA25qZ cEl5Y2xlaS/pJY7l4KCz5P5LpDgVJl2CYie5imcby0xbpsg9weFxQJiZehkEjQGf37zf lbLUhHVF1BX2lYsVUED07VCrTSLpNbfpH2w0xLHlvJt1zqwkAzFrWiDf/PVaiPZSwKtF hY6aHQbDPoGPuoDO1QToZHvmbPwawOVtA6ysfBRLnYUojf33/VAfo1nnUeQsM9mK95Mh 2EV45BuplutJZgOtlZHPWAN/ytYM4or5g5stL98c+ajztpDYYDN3dm0h8iY83aqFqnxU vNQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Cm7QnVX+1Peb/lxYvy314RNV95pm5UqmDVNYkqh6DVM=; b=J/hTGfz2aEIzBqKJcAzHfByl78SRbTwiM7KE4ubs442E3XKZZUdEB+eMMheH7Do/lv 5RvTIU8wKXdy3CEXKwFOgfsUvY2dCqt/Iy9sHTMCtuS9sx6cx6ZvHgWqm1feWxK+pPPk V6AAYoW8riR8dYmA1XsEY7sRbRJN8ZPVCx8sLtGSqtRJB9ylG20wW2y6sGnMCOVB51Mr VB9Sbcu4Wcc8yL5Kkxc9EOeQ/4IBPKV1Kfjhr/Xa5qaMFnaROCEaQ95muwEC7AQIM1vx aqXXeLCn64CPA9zMDI2o/iwvDEjrWyOO5jHTV5Wh5gk2PLjTuQceTsZVIMM5vmAjVJLf jacQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbhWByDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a1709067e0200b0094f712dac55si8265514ejr.734.2023.06.14.10.53.27; Wed, 14 Jun 2023 10:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbhWByDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231612AbjFNRJb (ORCPT + 99 others); Wed, 14 Jun 2023 13:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjFNRJ3 (ORCPT ); Wed, 14 Jun 2023 13:09:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D84AD2 for ; Wed, 14 Jun 2023 10:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686762521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cm7QnVX+1Peb/lxYvy314RNV95pm5UqmDVNYkqh6DVM=; b=WbhWByDrEVOdsqfgqNZisI0Qq3Z8rrviKqwT1awf8rKOcZYF2wmj+L0WOr3b6p23DjMBdq 1eTT6WQwFj1GCEyf3A+XkfPCFBIaYRlV6YnyAcYG5THSH+FCfGfq0vwqgE+71OG8N+wn/T zLS5gd7GZVjYRxDzoZ6c1WzHeSf/kxw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-372-XwCezD4iNx-HxUG8D2T_EQ-1; Wed, 14 Jun 2023 13:08:36 -0400 X-MC-Unique: XwCezD4iNx-HxUG8D2T_EQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 11DCB3C0D842; Wed, 14 Jun 2023 17:08:36 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.56]) by smtp.corp.redhat.com (Postfix) with SMTP id 199032166B25; Wed, 14 Jun 2023 17:08:31 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 14 Jun 2023 19:08:10 +0200 (CEST) Date: Wed, 14 Jun 2023 19:08:04 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Mike Christie , linux@leemhuis.info, nicolas.dichtel@6wind.com, axboe@kernel.dk, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com, sgarzare@redhat.com, jasowang@redhat.com, stefanha@redhat.com, brauner@kernel.org Subject: Re: [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression Message-ID: <20230614170803.GA18850@redhat.com> References: <20230601183232.8384-1-michael.christie@oracle.com> <20230602192254.GD555@redhat.com> <87r0qt18qq.fsf_-_@email.froward.int.ebiederm.org> <20230605151037.GE32275@redhat.com> <03c07f48-8922-f563-560c-f0d4cc3e1279@oracle.com> <20230606121643.GD7542@redhat.com> <39f5913c-e658-e476-0378-62236bb4ed49@oracle.com> <20230606193907.GB18866@redhat.com> <87o7llycau.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o7llycau.fsf@email.froward.int.ebiederm.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/11, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > > Could you spell to explain why this can't work (again, in this simple case) ? > > > > My current (and I know, very poor) understanding is that .release() should > > roughly do the following: > > > > 1. Ensure that vhost_work_queue() can't add the new callbacks > > > > 2. Call vhost_dev_flush() to ensure that worker->work_list is empty > > > > 3. Call vhost_task_stop() > > At least in the case of exec by the time the final fput happens > from close_on_exec the task has already changed it's mm. Of course you are right. But can't resist, please note that I only meant "this simple case" which doesn't include exec/etc. Nevermind. As Mike explains there are more problems even in this particular "simple" case, and I am not surprised. Sorry for noise, Oleg.