[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181030224012.mgatj7ddhj3sefkv@shells.gnugeneration.com>
Date: Tue, 30 Oct 2018 15:40:12 -0700
From: Vito Caputo <vcaputo@...garu.com>
To: Davidlohr Bueso <dave@...olabs.net>
Cc: Waiman Long <longman@...hat.com>, akpm@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] fs/proc: introduce /proc/stat2 file
On Tue, Oct 30, 2018 at 11:57:56AM -0700, Davidlohr Bueso wrote:
> On Mon, 29 Oct 2018, Vito Caputo wrote:
>
> > I'm definitely not in favor of just adding another stat file that is the
> > same format as the existing one with the intrs zeroed out. It's a dirty
> > hack; fine for your local needs but too gross for upstream IMHO.
>
> I suspect very few users of /proc/stat actually use the irq fields in the
> first place. So the common case ends up doing unnecessary operations. The
> stat2 approach is not perfect, but I think it's the best approach so far.
> This sort of renaming is not uncommon when we cannot break userspace, and
> its not like procfs is not already far contaminated already.
>
> There are not enough users that care about this stuff, afaik. What you
> suggest sounds like a lot of over-engineering.
>
What you suggest sounds like a kludge with zero engineering at all.
My suggestion might be stupid, insofar as the same thing can be achieved
using ioctls without assigning surprising semantics to an existing vfs
api. But I think the spirit of the suggestion is a reasonable
compromise, if /proc/stat is not a deprecated interface and it's
too difficult to make everything it collects sufficiently efficient on
any size machine.
If you create /proc/stat2 to omit interrupts, do we then create
/proc/stat3 to omit CPUs when just interrupts are of interest to the
application running on a 256-cpu machine?
Furthermore, your rationale of procfs already being contaminated is an
active embrace of the broken windows effect. If you recognize something
is flawed, it's cause to work harder to improve the situation when
working in the flawed area, not worsen it.
Regards,
Vito Caputo
Powered by blists - more mailing lists