Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6369934ybv; Wed, 12 Feb 2020 10:53:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxuN5JQOE18rt8zb0SCOi+y6TfUt5TuJUouIkjCHBbqj/rsU0qPQ88v0GrYpJHVDKyptXl3 X-Received: by 2002:a9d:1928:: with SMTP id j40mr10542537ota.68.1581533633925; Wed, 12 Feb 2020 10:53:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581533633; cv=none; d=google.com; s=arc-20160816; b=NQ+EZCHnYcxsyZsaxc+FqgZ0iUVnMZ8l7YE2N2vhiQwUhq5n+KQJd0L+x6w8dFHbSr YuyDdNgorIXET5agLLAKcTlYzoq9mvXTgZ6JO1/x8CUJJhnFml4e3MLnyuCNBpb6NYyk 39NYqVjZHa/McP8zeWNdE6H3Z6NJt9TIdYpSUIqDWqr6kztY2f2oe/sCmwOXsixmUbVL j25nuBtj0S5LR7REUeNZLgP5KHuhP85YiEAUOGJsKfLuit8NdgnOzZ/jZAC+MhwJTSNP jKMp3HL+mBIFhnLVVgLz4GscnEmTMXFEtiTlnq7b3FhLfOCqExwO/qHO32zVlil8A3wv cV4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8S2w7jKfhj8nqr2BEN6cbFr7nckGF3MBI5pTAOk2Bgk=; b=kpDZtF5rWPpVdO7j5BnA0+j2y+7yQu14oTUMaugko9wjLT2ELawRmdw4AW844WqkGo JGGhuli+2qkqK/IDFqWq6YybSchBCFlNvLA2njqRnd3Nu1g64sCU9S0tH/ZkS27bFpNd 4XB5HtDbTDqKqeJSAfkTs3H9bYhntgMUDIq3OYdIROYlwMRA+TMLbeo2wKVq3ognV9xl uRVvh5cHEo+aTeSPajg9jlvO/Xjt7WOWztPoxrIqiliqNCLYytzPIzMR7FuX3q7zo//Q O78dFKtD9F1fx2LAY9I52Npak9K+WQ4aGAeHyX8lthRj30NURgHSLtRbgFSl0hDunlrW cCqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="E/vN3AE3"; 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 h138si3633273oib.6.2020.02.12.10.53.41; Wed, 12 Feb 2020 10:53:53 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="E/vN3AE3"; 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 S1728987AbgBLSw4 (ORCPT + 99 others); Wed, 12 Feb 2020 13:52:56 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34433 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728948AbgBLSw4 (ORCPT ); Wed, 12 Feb 2020 13:52:56 -0500 Received: by mail-ed1-f65.google.com with SMTP id r18so3666477edl.1 for ; Wed, 12 Feb 2020 10:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8S2w7jKfhj8nqr2BEN6cbFr7nckGF3MBI5pTAOk2Bgk=; b=E/vN3AE3iyzGDOzjrhIyYOh5wyK5H3COrkDAy4Yb/0fuIwlyf50yEW7S/x5cDf9tHW zWbCuDLoLaAGtRSBjikTyE8yY06byotE/cGEhEbxOklsxfNCa9G0PsCjeYAs62WP1DSa M2BG1IabKnVo1IvqnOENDDauUUlMg+SJyMK4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8S2w7jKfhj8nqr2BEN6cbFr7nckGF3MBI5pTAOk2Bgk=; b=Rt9/Z7eOPTOvdlvBe/PjHygA8sJUPc4WNpDYFTtGPxzeQDwWttytHnA8swd6k2ViEb gndde7M2BPAw+dvhKH0AcTyFgnXIwPOvpBhXgU4GO/gLPSauGAYccSJS5GC6QV7xNk/V JIfaprEymSe1c+GR2vG7He45CGQKFtRjtIx+wbtu1ONbkBdbtzm8RIaY8fL9QcIdCMK0 bB7z2csZbAsBAkp50cSziNcHNeePa91WG+THTc9qTtKCwMsjHbuAtn2D0sZ2KngeGnbI I7Jvg6BFPJuQfB9VWw5c1YnXclPrmPWDZd4AY1WQBy00SCBayQLV1SW2Z6U9InOsPq9y OumQ== X-Gm-Message-State: APjAAAW3NBqzo5AzDluzWigSMMlcL/SRVfh3fI1qDLY4IEffET7adhIS /HM6ial7qdHF4zz4lo/wI176dSMVMis= X-Received: by 2002:a05:6402:b59:: with SMTP id bx25mr12417752edb.5.1581533574078; Wed, 12 Feb 2020 10:52:54 -0800 (PST) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com. [209.85.208.45]) by smtp.gmail.com with ESMTPSA id dd20sm101018ejb.59.2020.02.12.10.52.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Feb 2020 10:52:53 -0800 (PST) Received: by mail-ed1-f45.google.com with SMTP id p23so3645205edr.5 for ; Wed, 12 Feb 2020 10:52:53 -0800 (PST) X-Received: by 2002:a2e:97cc:: with SMTP id m12mr8440902ljj.241.1581533122702; Wed, 12 Feb 2020 10:45:22 -0800 (PST) MIME-Version: 1.0 References: <20200210150519.538333-1-gladkov.alexey@gmail.com> <20200210150519.538333-8-gladkov.alexey@gmail.com> <87v9odlxbr.fsf@x220.int.ebiederm.org> <20200212144921.sykucj4mekcziicz@comp-core-i7-2640m-0182e6> <87tv3vkg1a.fsf@x220.int.ebiederm.org> In-Reply-To: <87tv3vkg1a.fsf@x220.int.ebiederm.org> From: Linus Torvalds Date: Wed, 12 Feb 2020 10:45:06 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 07/11] proc: flush task dcache entries from all procfs instances To: "Eric W. Biederman" Cc: LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexander Viro , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Kees Cook , Oleg Nesterov , Solar Designer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 7:01 AM Eric W. Biederman wrote: > > Fundamentally proc_flush_task is an optimization. Just getting rid of > dentries earlier. At least at one point it was an important > optimization because the old process dentries would just sit around > doing nothing for anyone. I'm pretty sure it's still important. It's very easy to generate a _ton_ of dentries with /proc. > I wonder if instead of invalidating specific dentries we could instead > fire wake up a shrinker and point it at one or more instances of proc. It shouldn't be the dentries themselves that are a freeing problem. They're being RCU-free'd anyway because of lookup. It's the proc_mounts list that is the problem, isn't it? So it's just fs_info that needs to be rcu-delayed because it contains that list. Or is there something else? Linus