linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Marco Elver' <elver@google.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"glider@google.com" <glider@google.com>,
	"dvyukov@google.com" <dvyukov@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"kasan-dev@googlegroups.com" <kasan-dev@googlegroups.com>,
	Mel Gorman <mgorman@suse.de>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] kfence: use TASK_IDLE when awaiting allocation
Date: Fri, 21 May 2021 10:15:41 +0000	[thread overview]
Message-ID: <4a93b6d6c82049fc83004104f3e76fd7@AcuMS.aculab.com> (raw)
In-Reply-To: <YKeBvR0sZGTqX4fG@elver.google.com>

From: Marco Elver
> Sent: 21 May 2021 10:48
> 
> On Fri, May 21, 2021 at 09:39AM +0000, David Laight wrote:
> > From: Marco Elver
> > > Sent: 21 May 2021 09:32
> > >
> > > Since wait_event() uses TASK_UNINTERRUPTIBLE by default, waiting for an
> > > allocation counts towards load. However, for KFENCE, this does not make
> > > any sense, since there is no busy work we're awaiting.
> > >
> > > Instead, use TASK_IDLE via wait_event_idle() to not count towards load.
> >
> > Doesn't that let the process be interruptible by a signal.
> > Which is probably not desirable.
> >
> > There really ought to be a way of sleeping with TASK_UNINTERRUPTIBLE
> > without changing the load-average.
> 
> That's what TASK_IDLE is:
> 
> 	include/linux/sched.h:#define TASK_IDLE                 (TASK_UNINTERRUPTIBLE | TASK_NOLOAD)

That's been added since I last tried to stop tasks updating
the load-average :-)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)



      reply	other threads:[~2021-05-21 10:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  8:32 Marco Elver
2021-05-21  9:37 ` Hillf Danton
2021-05-21 11:17   ` Marco Elver
2021-05-21  9:39 ` David Laight
2021-05-21  9:47   ` Marco Elver
2021-05-21 10:15     ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a93b6d6c82049fc83004104f3e76fd7@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox