All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chen Ridong <chenridong@huaweicloud.com>
Cc: "mingo@redhat.com >> Ingo Molnar" <mingo@redhat.com>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
	bristot@redhat.com, "Valentin Schneider" <vschneid@redhat.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	pavel@ucw.cz, "Peter Zijlstra" <peterz@infradead.org>,
	chenridong <chenridong@huawei.com>,
	stable@vger.kernel.org,
	"stable-commits@vger.kernel.org Sasha Levin" <sashal@kernel.org>,
	"Tejun Heo" <tj@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>
Subject: Re: Patch "Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"" has been added to the 6.15-stable tree
Date: Thu, 31 Jul 2025 14:13:04 +0200	[thread overview]
Message-ID: <2025073105-obsessive-jigsaw-71ad@gregkh> (raw)
In-Reply-To: <0ec06dfd-0cab-4164-b3fc-37bc5effd037@huaweicloud.com>

On Thu, Jul 31, 2025 at 08:01:17PM +0800, Chen Ridong wrote:
> 
> 
> On 2025/7/29 22:33, Greg KH wrote:
> > On Tue, Jul 29, 2025 at 09:22:10PM +0800, Chen Ridong wrote:
> >>
> >>
> >> On 2025/7/24 17:43, Greg KH wrote:
> >>> On Thu, Jul 24, 2025 at 05:38:52PM +0800, Chen Ridong wrote:
> >>>>
> >>>>
> >>>> On 2025/7/23 13:06, Greg KH wrote:
> >>>>> On Wed, Jul 23, 2025 at 09:01:43AM +0800, Chen Ridong wrote:
> >>>>>>
> >>>>>>
> >>>>>> On 2025/7/22 20:38, Greg KH wrote:
> >>>>>>> On Tue, Jul 22, 2025 at 08:25:49PM +0800, Chen Ridong wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 2025/7/22 20:18, Greg KH wrote:
> >>>>>>>>> On Tue, Jul 22, 2025 at 09:29:13AM +0800, Chen Ridong wrote:
> >>>>>>>>>>
> >>>>>>>>>>> This is a note to let you know that I've just added the patch titled
> >>>>>>>>>>>
> >>>>>>>>>>>     Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"
> >>>>>>>>>>>
> >>>>>>>>>>> to the 6.15-stable tree which can be found at:
> >>>>>>>>>>>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >>>>>>>>>>>
> >>>>>>>>>>> The filename of the patch is:
> >>>>>>>>>>>      revert-cgroup_freezer-cgroup_freezing-check-if-not-f.patch
> >>>>>>>>>>> and it can be found in the queue-6.15 subdirectory.
> >>>>>>>>>>>
> >>>>>>>>>>> If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it.
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> The patch ("sched,freezer: Remove unnecessary warning in __thaw_task") should also be merged to
> >>>>>>>>>> prevent triggering another warning in __thaw_task().
> >>>>>>>>>
> >>>>>>>>> What is the git commit id of that change in Linus's tree?
> >>>>>>>>>
> >>>>>>>>> thanks,
> >>>>>>>>>
> >>>>>>>>> greg k-h
> >>>>>>>>
> >>>>>>>> 9beb8c5e77dc10e3889ff5f967eeffba78617a88 ("sched,freezer: Remove unnecessary warning in __thaw_task")
> >>>>>>>
> >>>>>>> Thanks, but that didn't apply to 6.1.y or 6.6.y.  Shouldn't it also go
> >>>>>>> there as that's what this revert was applied back to.
> >>>>>>>
> >>>>>>> greg k-h
> >>>>>>
> >>>>>> Hi Greg,
> >>>>>>
> >>>>>> The commit 9beb8c5e77dc ("sched,freezer: Remove unnecessary warning...") should be merged together
> >>>>>> with 14a67b42cb6f ("Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"") to avoid the
> >>>>>> warning for 6.1.y or 6.6.y.
> >>>>>
> >>>>> Ok, but 9beb8c5e77dc does not apply properly there.  Can you please
> >>>>> provide a working backport?
> >>>>>
> >>>>> thanks,
> >>>>>
> >>>>> greg k-h
> >>>>
> >>>> IIUC, we need to backport these two commits together:
> >>>> 1.commit 23ab79e8e469 ("freezer,sched: Do not restore saved_state of a thawed task")
> >>>> 2.commit 9beb8c5e77dc ("sched,freezer: Remove unnecessary warning...").
> >>>>
> >>>> After applying these prerequisites, the required change becomes minimal:
> >>>>
> >>>> diff --git a/kernel/freezer.c b/kernel/freezer.c
> >>>> index 4fad0e6fca64..288d1cce1fc4 100644
> >>>> --- a/kernel/freezer.c
> >>>> +++ b/kernel/freezer.c
> >>>> @@ -196,7 +196,7 @@ void __thaw_task(struct task_struct *p)
> >>>>         unsigned long flags, flags2;
> >>>>
> >>>>         spin_lock_irqsave(&freezer_lock, flags);
> >>>> -       if (WARN_ON_ONCE(freezing(p)))
> >>>> +       if (!frozen(p))
> >>>>                 goto unlock;
> >>>>
> >>>>         if (lock_task_sighand(p, &flags2)) {
> >>>>
> >>>> Would you like me to prepare and submit this patch for the stable branches (6.6.y and 6.1.y)?
> >>>
> >>> Yes, please send me the missing patches as a series for each branch that
> >>> needs them.
> >>>
> >>> thanks,
> >>>
> >>> greg k-h
> >>
> >> Hi Greg and maintainers,
> >>
> >> I've sent the patch series for 6.6.y. Backporting commit 9beb8c5e77dc ("sched,freezer: Remove
> >> unnecessary warning...") requires 4 patches for 6.6.y, and the backport to 6.1.y would be even more
> >> complex.
> >>
> >> As an alternative, I'm considering addressing the warning directly with the patch I mentioned
> >> previously. What are your thoughts on this approach?
> >>
> >> The new patch:
> >>
> >> diff --git a/kernel/freezer.c b/kernel/freezer.c
> >> index 4fad0e6fca64..288d1cce1fc4 100644
> >> --- a/kernel/freezer.c
> >> +++ b/kernel/freezer.c
> >> @@ -196,7 +196,7 @@ void __thaw_task(struct task_struct *p)
> >>         unsigned long flags, flags2;
> >>
> >>         spin_lock_irqsave(&freezer_lock, flags);
> >> -       if (WARN_ON_ONCE(freezing(p)))
> >> +       if (!frozen(p))
> >>                 goto unlock;
> >>
> >>         if (lock_task_sighand(p, &flags2)) {
> >>
> > 
> > I have no idea, sorry, please work with the developers/maintainers of
> > the original change and get their approval.  But normally, we do NOT
> > want one-off changes being made to older kernel trees unless it has to
> > be done, as that makes maintaining them much much much harder over time.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi, developers/maintainers,
> 
> Could you please review this series for 6.6.y?

What "this series" are you responding to?  This email subject says 6.15?
Please submit the patches, properly backported, in a form that you have
tested and wish to have reviewed, otherwise we have no idea of what to
do here.

Remember, some of us get 1000+ emails a day, context matters :)

thanks,

greg k-h

  reply	other threads:[~2025-07-31 12:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250721125251.814862-1-sashal@kernel.org>
     [not found] ` <1bafc8a024da4a95b28c02430f3d0c9d@huawei.com>
2025-07-22  1:29   ` Patch "Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"" has been added to the 6.15-stable tree Chen Ridong
2025-07-22 12:18     ` Greg KH
2025-07-22 12:25       ` Chen Ridong
2025-07-22 12:38         ` Greg KH
2025-07-23  1:01           ` Chen Ridong
2025-07-23  5:06             ` Greg KH
2025-07-24  9:38               ` Chen Ridong
2025-07-24  9:43                 ` Greg KH
2025-07-28  2:41                   ` [PATCH 6.6 0/5] [Backport] sched,freezer: Remove unnecessary warning in __thaw_task Chen Ridong
2025-07-28  2:41                     ` [PATCH 6.6 1/5] sched/core: Remove ifdeffery for saved_state Chen Ridong
2025-07-28  2:41                     ` [PATCH 6.6 2/5] freezer,sched: Use saved_state to reduce some spurious wakeups Chen Ridong
2025-07-28  2:41                     ` [PATCH 6.6 3/5] freezer,sched: Do not restore saved_state of a thawed task Chen Ridong
2025-07-28  2:41                     ` [PATCH 6.6 4/5] freezer,sched: Clean saved_state when restoring it during thaw Chen Ridong
2025-07-28  2:41                     ` [PATCH 6.6 5/5] sched,freezer: Remove unnecessary warning in __thaw_task Chen Ridong
2025-07-28  3:11                     ` [PATCH 6.6 0/5] [Backport] " Chen Ridong
2025-07-28  2:54                   ` Chen Ridong
2025-07-28  2:54                     ` [PATCH 6.6 1/5] sched/core: Remove ifdeffery for saved_state Chen Ridong
2025-07-28 12:45                       ` Sasha Levin
2025-07-28  2:54                     ` [PATCH 6.6 2/5] freezer,sched: Use saved_state to reduce some spurious wakeups Chen Ridong
2025-07-28 12:45                       ` Sasha Levin
2025-07-28  2:54                     ` [PATCH 6.6 3/5] freezer,sched: Do not restore saved_state of a thawed task Chen Ridong
2025-07-28 12:49                       ` Sasha Levin
2025-07-28  2:54                     ` [PATCH 6.6 4/5] freezer,sched: Clean saved_state when restoring it during thaw Chen Ridong
2025-07-28 12:45                       ` Sasha Levin
2025-07-28  2:54                     ` [PATCH 6.6 5/5] sched,freezer: Remove unnecessary warning in __thaw_task Chen Ridong
2025-07-28 12:45                       ` Sasha Levin
2025-07-29 13:22                   ` Patch "Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"" has been added to the 6.15-stable tree Chen Ridong
2025-07-29 14:33                     ` Greg KH
2025-07-31 12:01                       ` Chen Ridong
2025-07-31 12:13                         ` Greg KH [this message]
2025-07-31 12:21                           ` Chen Ridong

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=2025073105-obsessive-jigsaw-71ad@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=chenridong@huawei.com \
    --cc=chenridong@huaweicloud.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@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.