lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2c79d91e29134ef6184138de5fc856ca530d2a5.camel@hammerspace.com>
Date:   Mon, 9 Nov 2020 14:11:42 +0000
From:   Trond Myklebust <trondmy@...merspace.com>
To:     "tj@...nel.org" <tj@...nel.org>
CC:     "jiangshanlai@...il.com" <jiangshanlai@...il.com>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "juri.lelli@...hat.com" <juri.lelli@...hat.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "neilb@...e.de" <neilb@...e.de>
Subject: Re: [PATCH rfc] workqueue: honour cond_resched() more effectively.

On Mon, 2020-11-09 at 09:01 -0500, tj@...nel.org wrote:
> Hello,
> 
> On Mon, Nov 09, 2020 at 01:50:40PM +0000, Trond Myklebust wrote:
> > > I'm thinking the real problem is that you're abusing workqueues.
> > > Just
> > > don't stuff so much work into it that this becomes a problem. Or
> > > rather,
> > > if you do, don't lie to it about it.
> > 
> > If we can't use workqueues to call iput_final() on an inode, then
> > what
> > is the point of having them at all?
> > 
> > Neil's use case is simply a file that has managed to accumulate a
> > seriously large page cache, and is therefore taking a long time to
> > complete the call to truncate_inode_pages_final(). Are you saying
> > we
> > have to allocate a dedicated thread for every case where this
> > happens?
> 
> I think the right thing to do here is setting CPU_INTENSIVE or using
> an
> unbound workqueue. Concurrency controlled per-cpu workqueue is
> unlikely to
> be a good fit if the work can run long enough to need cond_resched().
> Better
> to let the scheduler handle it. Making workqueue warn against long-
> running
> concurrency managed per-cpu work items would be great. I'll put that
> on my
> todo list but if anyone is interested please be my guest.
> 

That means changing all filesystem code to use cpu-intensive queues. As
far as I can tell, they all use workqueues (most of them using the
standard system queue) for fput(), dput() and/or iput() calls.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ