mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: paulmck@kernel.org
Cc: Breno Leitao <leitao@debian.org>, Hugh Dickins <hughd@google.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH] mm/shmem: report RCU-tasks quiescent states while undoing a range
Date: Fri, 18 Sep 2026 13:43:42 -0700	[thread overview]
Message-ID: <20260918134342.c50423cfe3b2910e899226f2@linux-foundation.org> (raw)
In-Reply-To: <a67e8b91-ebc2-4d3d-b6ea-d221b297fad0@paulmck-laptop>

On Fri, 18 Sep 2026 13:24:53 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:

> > 
> > > --- a/mm/shmem.c
> > > +++ b/mm/shmem.c
> > > @@ -1367,7 +1367,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, uoff_t lend,
> > >  		}
> > >  		folio_batch_remove_exceptionals(&fbatch);
> > >  		folio_batch_release(&fbatch);
> > > -		cond_resched();
> > > +		cond_resched_tasks_rcu_qs();
> > 
> > Won't this change remove the cond_resched() function from old kernels
> > which really want it?
> 
> The cond_resched_tasks_rcu_qs() macro implies cond_resched():
> 
> 	#define cond_resched_tasks_rcu_qs() \
> 	do { \
> 		rcu_tasks_qs(current, false); \
> 		cond_resched(); \
> 	} while (0)
> 

Oh, should've looked.

And it appears to have been this way forever, so
s/cond_resched/cond_resched_tasks_rcu_qs/ won't break old kernels.

  reply	other threads:[~2026-09-18 20:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 11:24 Breno Leitao
2026-09-18 19:32 ` Andrew Morton
2026-09-18 20:24   ` Paul E. McKenney
2026-09-18 20:43     ` Andrew Morton [this message]
2026-09-18 20:48       ` Paul E. McKenney
2026-09-19  0:25 ` SJ Park

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=20260918134342.c50423cfe3b2910e899226f2@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=hughd@google.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=paulmck@kernel.org \
    --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

all inboxes | Powered by JetHome®