Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4235372rdh; Tue, 28 Nov 2023 16:14:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeeA/bxgBc+fdUm9DefS1E8fpAtffAfzIrMBkO86uLsA6Kb9nHNHNW93hloO8l4hITTf2L X-Received: by 2002:a17:90b:1bc3:b0:285:8939:c4b1 with SMTP id oa3-20020a17090b1bc300b002858939c4b1mr16878970pjb.43.1701216875853; Tue, 28 Nov 2023 16:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701216875; cv=none; d=google.com; s=arc-20160816; b=EkM1Mn0tNImSren7Dc9m1Zntej/Yze7zBY5/VKTNAR2VEHqe/uoj7QhY6dmPBhXkcQ iecFEm/ccf4kbkeicyxOvZUE/wHpH5vs4YhGd0Iow5tP7gMb2wVhXH4QAJYrCXPuJO3W XOTmXp062FQW2oCJduK1qxkT5UKFx32zoFjy/ZcP1R79u7JjGWNt/7+FP84cz7FXdR6b jn7Ygwd40FNSVqPNCGqwYdkCKJR48gdq9GV/bMZ/uJrki/zFpTqI0a8M2384O9YpJPzX tCT8lyuTa8d3nsctECoIZ7Dg6jfCdgHbsF0RyKu/2yKItaN2lO3V5wWKp1uEQp88kLCc RN4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:references:in-reply-to:subject:cc:to:from :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding; bh=kFViGT4No1VNR2EfmORzy+rEeVlYBUyE9SDVjGC33NM=; fh=jbEk7J0x+eRUScZMEldrXUl5oVSI7ePhJUX2aNlQvjE=; b=WvEJNOZ9HmFyOyHh9JhjfsoxcyZQlrsRPXio3kDUKDzhUkT/M4Aanby40z/pAiCZqH 72EGB65bAQW7975dp+G+z2lhJYUw1xZ35SnlhzCPP673CX9Y6LOArV5wkJbNU5WnQYFt NL2r9qfuFGnmveteVlfEIklfPBWelGRUR/DVmZgsg1hJJ+/cl5djAb7Z5TLWoVwaWcZh kwPfUJlaoTFLArMUjP/AkmKVwJ6NMZKCUOkf4ij+4MfYo5AH0AMY/LbmDJVbZmdF3S47 owIllMyYLfMMVyzciLQoj1vj0bXwf0Uy3YrqIQ/Fzo+NCQfdynwOVnr5JvYxpLVPHzRV 7Sew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ds23-20020a17090b08d700b00277e0d7163asi127528pjb.32.2023.11.28.16.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 16:14:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-158-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5DEEF28309B for ; Wed, 29 Nov 2023 00:14:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64DC5371; Wed, 29 Nov 2023 00:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Original-To: linux-nfs@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8FD419A6; Tue, 28 Nov 2023 16:14:31 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 56B621F8A6; Wed, 29 Nov 2023 00:14:30 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CCD8E13637; Wed, 29 Nov 2023 00:14:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id Xx3pHmGCZmUqZwAAD6G6ig (envelope-from ); Wed, 29 Nov 2023 00:14:25 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "NeilBrown" To: "Oleg Nesterov" Cc: "Al Viro" , "Christian Brauner" , "Jens Axboe" , "Chuck Lever" , "Jeff Layton" , "Ingo Molnar" , "Peter Zijlstra" , "Juri Lelli" , "Vincent Guittot" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH/RFC] core/nfsd: allow kernel threads to use task_work. In-reply-to: <20231128140156.GC22743@redhat.com> References: <170112272125.7109.6245462722883333440@noble.neil.brown.name>, <20231128140156.GC22743@redhat.com> Date: Wed, 29 Nov 2023 11:14:22 +1100 Message-id: <170121686264.7109.13475581089284671405@noble.neil.brown.name> X-Spam-Level: X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: 56B621F8A6 X-Spam-Score: -4.00 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] On Wed, 29 Nov 2023, Oleg Nesterov wrote: > On 11/28, NeilBrown wrote: > > > > I have evidence from a customer site of 256 nfsd threads adding files to > > delayed_fput_lists nearly twice as fast they are retired by a single > > work-queue thread running delayed_fput(). As you might imagine this > > does not end well (20 million files in the queue at the time a snapshot > > was taken for analysis). > > On a related note... Neil, Al, et al, can you look at > > [PATCH 1/3] fput: don't abuse task_work_add() when possible > https://lore.kernel.org/all/20150908171446.GA14589@redhat.com/ > Would it make sense to create a separate task_struct->delayed_fput llist? fput() adds the file to this llist and if it was the first item on the list, it then adds the task_work. That would probably request adding a callback_head to struct task_struct as well. NeilBrown