All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Vlastimil Babka <vbabka@suse.cz>, Peter Zijlstra <peterz@infradead.org>
Cc: Nicolas Saenz Julienne <nsaenzju@redhat.com>,
	akpm@linux-foundation.org, frederic@kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, cl@linux.com,
	juri.lelli@redhat.com, mingo@redhat.com, mtosatti@redhat.com,
	nilal@redhat.com, mgorman@suse.de, ppandit@redhat.com,
	williams@redhat.com, bigeasy@linutronix.de,
	anna-maria@linutronix.de, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH 0/6] mm: Remote LRU per-cpu pagevec cache/per-cpu page list drain support
Date: Thu, 23 Sep 2021 12:36:37 +0200	[thread overview]
Message-ID: <878rznh93e.ffs@tglx> (raw)
In-Reply-To: <efb4a5e1-d64a-38de-97d8-350c3d1b0962@suse.cz>

Vlastimil,

On Thu, Sep 23 2021 at 09:12, Vlastimil Babka wrote:
> On 9/23/21 00:09, Thomas Gleixner wrote:
>>   local_lock() 		-> preempt_disable()
>>   local_lock_irq()	-> local_irq_disable()
>>   ...
>
> Yes, to be clean, this would have to be a new primitive, not just an abused
> local lock. It would just look similar to the RT version (a percpu array of
> spinlocks), so for this patchset it would allow not to have two such locks
> side be side (local + spin) while only one is being used. For maximum
> flexibility the initialization would take a CONFIG_ (or something
> compile-time bool) that when false would make the !RT version an empty
> struct and "locking" would rely on preempt/irq disable (just as with !RT
> local_lock). If compile-time true it would take a static key to decide on
> boot whether the !RT version only does the preepmt/irq disable or actually
> takes the lock.
>
> But as you say below, it's too much complexity for questionable benefit.
>
> But maybe this can all be avoided anyway, as I recalled what we do for
> vmstat already (IIUC). See quiet_vmstat() - when cpu enters the nohz mode,
> it flushes per-cpu vmstat diffs and then there's no reason to further
> disturb the cpu to do that while it's on NOHZ mode. We could do the same for
> lru pagevecs and pcplists?

I'm not sure about this. I like the idea of being able to offload things
to housekeeping CPUs not only in the full isolation case.

A good example is RCU which allows to offload all RCU processing to some
other CPU(s), which is useful even w/o full isolation.

The synchronous quiescing on entering NOHZ full mode is a cute
workaround but for one it makes entering NOHZ full more expensive and it
does not necessarily provide good isolation guarantees under all
circumstances, while a full remote processing definitely does.

I think it's at least worthwhile to investigate.

Thanks,

        tglx

  reply	other threads:[~2021-09-23 10:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 16:13 [PATCH 0/6] mm: Remote LRU per-cpu pagevec cache/per-cpu page list drain support Nicolas Saenz Julienne
2021-09-21 16:13 ` [PATCH 1/6] mm/swap: Introduce lru_cpu_needs_drain() Nicolas Saenz Julienne
2021-09-21 16:13 ` [PATCH 2/6] mm/swap: Introduce alternative per-cpu LRU cache locking Nicolas Saenz Julienne
2021-09-21 22:03   ` Peter Zijlstra
2021-09-22  8:47     ` nsaenzju
2021-09-22  8:47       ` nsaenzju
2021-09-22  9:20       ` Sebastian Andrzej Siewior
2021-09-22  9:50         ` nsaenzju
2021-09-22  9:50           ` nsaenzju
2021-09-22 11:37       ` Peter Zijlstra
2021-09-22 11:43         ` nsaenzju
2021-09-22 11:43           ` nsaenzju
2021-09-21 16:13 ` [PATCH 3/6] mm/swap: Allow remote LRU cache draining Nicolas Saenz Julienne
2021-09-21 16:13 ` [PATCH 4/6] mm/page_alloc: Introduce alternative per-cpu list locking Nicolas Saenz Julienne
2021-09-21 16:13 ` [PATCH 5/6] mm/page_alloc: Allow remote per-cpu page list draining Nicolas Saenz Julienne
2021-09-21 16:13 ` [PATCH 6/6] sched/isolation: Enable 'remote_pcpu_cache_access' on NOHZ_FULL systems Nicolas Saenz Julienne
2021-09-21 17:51 ` [PATCH 0/6] mm: Remote LRU per-cpu pagevec cache/per-cpu page list drain support Andrew Morton
2021-09-21 17:59 ` Vlastimil Babka
2021-09-22 11:28   ` Peter Zijlstra
2021-09-22 22:09     ` Thomas Gleixner
2021-09-23  7:12       ` Vlastimil Babka
2021-09-23 10:36         ` Thomas Gleixner [this message]
2021-09-27  9:30       ` nsaenzju
2021-09-27  9:30         ` nsaenzju

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=878rznh93e.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=cl@linux.com \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=nilal@redhat.com \
    --cc=nsaenzju@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ppandit@redhat.com \
    --cc=vbabka@suse.cz \
    --cc=williams@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.