Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4378315pxu; Wed, 9 Dec 2020 15:58:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyo6Q6/YtSY1x6aY6f+WndI2CQWhl0fo84oKql6pJS66S3J5DGFSfSweCGVAj7HelqrRtNR X-Received: by 2002:a17:906:3114:: with SMTP id 20mr4154566ejx.460.1607558315199; Wed, 09 Dec 2020 15:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607558315; cv=none; d=google.com; s=arc-20160816; b=DdMY3x8FTZSj/jgx03/Ns0CCzcFwwv4JeVWlXKiADPG1viqF/7Qg8oQ/wBee/s0M2T dN5ftGLiMgad6vEj1vbQXs6P/MCwPl5U/xMrxCBR4phu3Rh2hFK/EGGcMT1AkjUeXA9a 041jFlUfr7CZsGKY6nh7kdSKscxhCeDWfn+gC2KUVBRv6QwNL5dj+pAxvnr2jrUx5ZWl L9P3GMOQ4T4o5EdeVSblJPa3ZLg9HQb0NInA+H157gwuazkd6DlmfF2f398y++H6Wvo8 j4X+sWrsb5OV2jSGIXn/vtJG51+EfVYBowhz8FmX2X95DvZT7XsMgZF0JpDHu45FSCw1 2S0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :date; bh=BhY+XtJUQJRmhR2Fen9pzklAhAx89Ps6PmqGEZu8Kgc=; b=V6EWk+E7oT5ocm/kEE3zm+006qiZgDs+fN4wIqRAn8/ch1hTm4OjllxqIpbop78zLJ AMULYjg8RHMgmKEpCaa8xuMjTf3KcPNuBz4jhgUlANP/0f+w93BIfFzMxuB5ocB3gkIR Hi1R+3YlySJbcV7Zvn7Zi6tpGwt+XG/u6SAizFG/hmVz//oM10eZne5Q02NfrD7mpCcJ +Eox/AVhnzsh3Z+GJOQjbSGmEDk7wrvc8OBt9XydNUVue/rICKBPXzLRU8FvxLy+IfWR cLsn//DysyX2B7a7bZI+QYtTDQH0FCUkZ+hlIGdrXyNj9+e/7B0yX4FVVAhUYr+eIqQ7 vOCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kyed3dZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si1827000eds.65.2020.12.09.15.58.13; Wed, 09 Dec 2020 15:58:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kyed3dZ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388461AbgLIXRl (ORCPT + 99 others); Wed, 9 Dec 2020 18:17:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:52974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728541AbgLIXRl (ORCPT ); Wed, 9 Dec 2020 18:17:41 -0500 Date: Wed, 9 Dec 2020 15:16:59 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607555820; bh=ohmvuSKbrDJ5z2QP7Lxb/NjUrmQI5TqmzNvkB3SHFbE=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=Kyed3dZ9L8UEGFa9HnulMTDycEUR7XX0LBzT3zVgfX/0Xl29Mvo63Azn/ItGfnOkX DQfq2gv+diulkzqQuoa7uDz3iPnlauz/8+bZEznXgzuhTD6qjpeXf3PBe8Q5Mjz7Z0 cz3HrtEJD6fWqqciCqpTA2u21tL8Desw2BrU7uR+LSErSemmuRhcpZjFyCwRBVkGaR JhyPoinhy5N7D4ZbhA8UIpcCbcc2FZsYjPZAlNOoksBHn5LDooTZ0GAOMZbidlAgzn rdn1ThLOGysAZszDNLKbW2PF0Fdg7L7CbiWF48RJ619Y/UxTgmvb97vexymYQ4tQYC rm/FtGRxjj4+g== From: Jakub Kicinski To: SeongJae Park Cc: , SeongJae Park , , , , , Subject: Re: [PATCH 1/1] net/ipv4/inet_fragment: Batch fqdir destroy works Message-ID: <20201209151659.125b43da@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: <20201208094529.23266-2-sjpark@amazon.com> References: <20201208094529.23266-1-sjpark@amazon.com> <20201208094529.23266-2-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Dec 2020 10:45:29 +0100 SeongJae Park wrote: > From: SeongJae Park > > In 'fqdir_exit()', a work for destruction of the 'fqdir' is enqueued. > The work function, 'fqdir_work_fn()', calls 'rcu_barrier()'. In case of > intensive 'fqdir_exit()' (e.g., frequent 'unshare(CLONE_NEWNET)' > systemcalls), this increased contention could result in unacceptably > high latency of 'rcu_barrier()'. This commit avoids such contention by > doing the destruction in batched manner, as similar to that of > 'cleanup_net()'. > > Signed-off-by: SeongJae Park Looks fine to me, but you haven't CCed Florian or Eric who where the last two people to touch this function. Please repost CCing them and fixing the nit below, thanks! > static void fqdir_work_fn(struct work_struct *work) > { > - struct fqdir *fqdir = container_of(work, struct fqdir, destroy_work); > - struct inet_frags *f = fqdir->f; > + struct llist_node *kill_list; > + struct fqdir *fqdir; > + struct inet_frags *f; nit: reorder fqdir and f to keep reverse xmas tree variable ordering.