Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp924757imj; Fri, 15 Feb 2019 09:03:56 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibru3Iazx0ZAZl+AoWkizSS5vou4iaTm/K2gI+yKcqT23ETr7PKdoAXD/virRkdpglpiCar X-Received: by 2002:a17:902:9689:: with SMTP id n9mr11281783plp.8.1550250236784; Fri, 15 Feb 2019 09:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550250236; cv=none; d=google.com; s=arc-20160816; b=B24hLJXyEB7IDbeqRlKNHTPkNTE8RlnDdAnJubup41AhLA9xYUvWz99IGRqgJRs+Cb HWx/n4VA+pCXF3fdCUOUD9NOIWc+vpE3L8KRuBvjrS41Wv7v0F9JQHicuvU6erjTmrkY BUaG2FVtMwUfQDvJ6LNqmkR/K1n2moI+UOJUWbdSm/ljixUbgoi/wD2APXnSiKDUXzTO Ae3+M9K8weFZcCYb34E5+c+aRRY7X6sP7XxWq/O1UGCsFp++LeHggTf75ztov8ScjKBm u29vxOAGpr8wH+1oh8FK5+/aPKM9PEDg9ywMczYCSXrYoMdqIA364ueRdOjTGiaMsVTD cxww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date; bh=fbSOqya1cqHs5G3OEOXwycptiNDk1I2O4L81l63T6bo=; b=p198g8XEuf/cA7UUsIVncfXBw3eD77DXjSQC5X5O+dKp5j3koMWPiGWaflhgsP0ayI Stq90qAI2BM7c4QdfZk4+kP2Fnvp86SgAq3oY/jrSF90mYr89Iiml6291yWyEzHLSo6I TiuP3kQg7gbY4AWtTSAo+JyrmYvgScHtDSvHyEN5sY5jHdmXuZXlC1QdjHUt8U2Lnv9f g3oX0/pwe3J13nOF15oop1rqwKFsoAOw9iEHtjmp0/Q16OI8uElY90ueG6pBizHhYcod wGnNMCJBkKl0z+vIJVzH6RqXr8anUqCsYUx2CrwmU0dVcGUZu81d+Xd3bDYRnrMkTIr9 kbVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si5895190pfk.243.2019.02.15.09.03.24; Fri, 15 Feb 2019 09:03:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728620AbfBOQfP (ORCPT + 99 others); Fri, 15 Feb 2019 11:35:15 -0500 Received: from fieldses.org ([173.255.197.46]:39360 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbfBOQfO (ORCPT ); Fri, 15 Feb 2019 11:35:14 -0500 Received: by fieldses.org (Postfix, from userid 2815) id 11D521CE7; Fri, 15 Feb 2019 11:35:14 -0500 (EST) Date: Fri, 15 Feb 2019 11:35:14 -0500 To: "J. Bruce Fields" Cc: Jeff Layton , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Trond Myklebust , David Howells , Tejun Heo , Peter Zijlstra , Shaohua Li , Oleg Nesterov Subject: Re: [PATCH 0/7] Eliminate delegation self-conflicts Message-ID: <20190215163514.GA22354@fieldses.org> References: <1549656647-25115-1-git-send-email-bfields@redhat.com> <20190211155803.GA28714@parsley.fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211155803.GA28714@parsley.fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 10:58:04AM -0500, J. Bruce Fields wrote: > On Sat, Feb 09, 2019 at 07:43:54AM -0500, Jeff Layton wrote: > > On Fri, 2019-02-08 at 15:10 -0500, J. Bruce Fields wrote: > > > From: "J. Bruce Fields" > > > > > > These patches allow NFSv4 clients holding delegations to keep them when > > > the operation that would break a delegation comes from the same client. > > > > > > To do that, we somehow need to pass the identity of the > > > delegation-breaker down through the VFS. > > > > > > This series uses the tgid, a solution suggested by Trond. To do that we > > > need nfsd tasks to share the same tgid. I do that by extending the > > > kthread code slightly to allow knfsd to run the kthreadd main loop in a > > > task of its own, and spawn its server threads off of that task. > ... > > Nice work! I like the basic idea, the changes seem to be well-organized, > > and the tgid semantics are clear and make sense. > > > > Would this preclude us from moving to a workqueue-based model for knfsd > > later? It's likely to still be worth it, but it'd be good to understand > > the potential drawbacks. > > I was wondering about that too, but I haven't looked into it yet. > Workqueues look a lot more complicated than kthreads. I spent some time staring, and... I still don't really understand the workqueue code. But if this kthread_group[*] code is acceptable than I can't see why it shouldn't be possible to create a workqueue whose work items are all handled by threads spawned form the same kthread_group. --b. [*] Open to suggestions of better names.