[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABWYdi0_cdketW=Rc-6s1n7ZQ4ALJL7EuOquUSjOGNb5oVjvRA@mail.gmail.com>
Date: Mon, 19 Sep 2022 15:03:58 -0700
From: Ivan Babrou <ivan@...udflare.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
kernel-team <kernel-team@...udflare.com>,
Kalesh Singh <kaleshsingh@...gle.com>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC] proc: report open files as size in stat() for /proc/pid/fd
On Mon, Sep 19, 2022 at 5:30 AM Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> On Sat, Sep 17, 2022 at 11:32:02AM -0700, Ivan Babrou wrote:
> > > > > * Make fd count acces O(1) and expose it in /proc/pid/status
> > >
> > > This is doable, next to FDSize.
> >
> > It feels like a better solution, but maybe I'm missing some context
> > here. Let me know whether this is preferred.
>
> I don't know. I'd put it in st_size as you did initially.
> /proc/*/status should be slow.
Could you elaborate what you mean?
* Are you saying that having FDUsed in /proc/*/status _would_ be slow?
I would imagine that adding atomic_read() there shouldn't slow things
down too much.
* Are you saying that reading /proc/*/status is already slow and
reading the number of open files from there would be inefficient?
Powered by blists - more mailing lists