Received: by 10.192.165.148 with SMTP id m20csp4284717imm; Mon, 23 Apr 2018 23:28:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49IK5v7Xp5nTQMMnNd2ZrK8BedEz7F1poBnyxn57XpoxtViLGKmxi5pcT5CQ/NhelrCFx3u X-Received: by 2002:a17:902:822:: with SMTP id 31-v6mr16078368plk.172.1524551337748; Mon, 23 Apr 2018 23:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524551337; cv=none; d=google.com; s=arc-20160816; b=0fqiU354ahC1O+WCDnkomeQeuy4X8aIS1an7wPUxzzVdRBKYI3zEnhYhX7PihyYbGJ 1O8GedUTrDwN04VTP9xutfzzCihAv3pyu6efgxnMUBJSqaTLHfkNIPT1kLgMnKHbwY2I j5770TFp8GtE5a9HLCJZ1HN84ti5aBZZY5EUVgXgihNIebvobSFmXaGYHNmfocRyRFp/ BN40S3EnC0YHEhaWGhNV0azJS2nBYmw/7GWCi7Ymy1XNpDrDfxoYRMmnp/x6vPKg2ASp MTke9lHiz+okoo41VNzwcRT1/cIz2fDe862d6zj3lp15i4mTi7lequxcGsAo22yzTicL hrTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=HPuYpk3Af7f0IeRgTATNP7FmVyyEOfFteCP4ddPPQ4A=; b=kWQBi0iRTFFRaUZL4V8QP/1gNF5DSK/SJJsoL+q/jutem5ZdebVkKSPq4H5sp4ZRFI D+D/cbrqzMtx/lqH1sca6jBOREpbD0YIVJ69ZnSeZLXuc995d0yv8B4ijqm//GHFj1cl C4HprN9MFbfd3NgLregDsPMQqQWBTzqfXHooGv0NexzvsdDFuyM+hhMLaXM4TYqcthBW OytjOdqvv/XAFXTcg6vdt7idOVzQxvXmsNRys4pRGUnJHkCLYXOk31DEyLruockTSY3/ o9TBtz0jSMBM6Og5hPFPuWcSigbI3xPhlhfDoCPLRCr3UaPnpP34uqXRm3OSu7KW6E24 xh5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KNxFRVoT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si12251870pfe.248.2018.04.23.23.28.43; Mon, 23 Apr 2018 23:28:57 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=KNxFRVoT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756115AbeDXGRG (ORCPT + 99 others); Tue, 24 Apr 2018 02:17:06 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35433 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755165AbeDXGRE (ORCPT ); Tue, 24 Apr 2018 02:17:04 -0400 Received: by mail-wr0-f193.google.com with SMTP id w3-v6so47220420wrg.2; Mon, 23 Apr 2018 23:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HPuYpk3Af7f0IeRgTATNP7FmVyyEOfFteCP4ddPPQ4A=; b=KNxFRVoTypxJIWp30fyXnHH7DUv3yNxETbeeYda/pUW1alylasqbMGdyy39wpAsr4M 4yWIKSh4KAW8/R8oiW2S93v2+3xFfIabEjihiJTsPAZPxgbtBJqaqPjh4gf2e+9Qt4up DlnZzZntFko+DREnUgBCSAljrsgqphbNcNrrXhs602Kh2heHZ2KpR6Auz+RT/yCzQrBb Sd2TEeZYXqRcg27a9Dskhzo/qW0k1FFkzqKVgvR1tiR8qfBybhYn4KXY4DyE1Itrf+/z e92h3YlMJA/TAauPYF2nNdd4lOjErWVSCT4T2FkUnsQfHtQkUJ3XZa5ix/tG9LHkgXNo 0IZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HPuYpk3Af7f0IeRgTATNP7FmVyyEOfFteCP4ddPPQ4A=; b=L4Cqa97An0kOL+Vx/4ZvYMU+CNo0WxN81MEBpFdv0v6hxFjO9Fkqr880i4HV/RrN0Z QW/AlQSYGxVlxbOkKxjPlahCuksoObpN5DJCDhno8fVqPFxB9wfdcInqnFqfmjxABAes oAlt/Jm3AvPtKUZpxRVvDR1JdBPvAQdO3Ds9PjpMKbFYYxttHwG8jYr41P4KuPY7jdUG uzjAjf3y7S8X+/ENYkF7docN5PZNA0xq0KgXWUKQXfgUnMaxbWMRLLy/LkkYCoF0yoWr PyiE234OeTNQ14BntoDJp0WlEO9Ia3Fa410vtUAiNKFKywqOBNbH6s6lSe3nH8gPx7SZ Cs0Q== X-Gm-Message-State: ALQs6tDe58SECHdPylVvpoY5W4h1grhWSq0m60w82eOMByJ2wMNw4tAK G4luFGKlI7nRjxCwBtWrjg== X-Received: by 10.28.218.80 with SMTP id r77mr1691664wmg.105.1524550623696; Mon, 23 Apr 2018 23:17:03 -0700 (PDT) Received: from avx2 (nat4-minsk-pool-46-53-177-92.telecom.by. [46.53.177.92]) by smtp.gmail.com with ESMTPSA id w5sm6984066wmw.31.2018.04.23.23.17.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 23:17:03 -0700 (PDT) Date: Tue, 24 Apr 2018 09:17:00 +0300 From: Alexey Dobriyan To: jeffm@suse.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Al Viro , "Eric W . Biederman" , Oleg Nesterov Subject: Re: [RFC] [PATCH 0/5] procfs: reduce duplication by using symlinks Message-ID: <20180424061700.GA3689@avx2> References: <20180424022106.16952-1-jeffm@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180424022106.16952-1-jeffm@suse.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 10:21:01PM -0400, jeffm@suse.com wrote: > Memory pressure isn't really an issue on this machine, so we > end up using well over 100GB for proc files. Text files at scale! > With these patches applied, running the same testcase, the proc_inode > cache only gets to about 600k objects, which is about 99.7% fewer. I > get that procfs isn't supposed to be scalable, but this is kind of > extreme. :) Easy stuff: * all ->get_link hooks are broken in RCU lookup (use GFP_KERNEL), * "%.*s" for dentry names is probably unnecessary, they're always NUL terminated * kasprintf() does printing twice, since we're kind of care about /proc performance, allocate for the worst case. * "int nlinks = nlink_tgid;" Unsigned police. * (inode->i_mode & S_IFLNK) this is sketchy, S_ISLNK exists.