Re: [RFC][PATCH 2/2] time: alarmtimer: Use TASK_FREEZABLE to cleanup freezer handling

From: Thomas Gleixner
Date: Wed Feb 15 2023 - 08:53:12 EST


On Wed, Feb 15 2023 at 09:22, Michael Nazzareno Trimarchi wrote:
> On Sat, Feb 11, 2023 at 7:45 AM John Stultz <jstultz@xxxxxxxxxx> wrote:
>> /**
>> * clock2alarm - helper that converts from clockid to alarmtypes
>> * @clockid: clockid.
>> @@ -750,7 +703,7 @@ static int alarmtimer_do_nsleep(struct alarm *alarm, ktime_t absexp,
>> struct restart_block *restart;
>> alarm->data = (void *)current;
>> do {
>> - set_current_state(TASK_INTERRUPTIBLE);
>> + set_current_state(TASK_INTERRUPTIBLE | TASK_FREEZABLE);
>
> For kernel 5.10.x and lts is possible to use freezable_schedule and
> let this set_current_state as was before.
> I have seen patch that introduce the new state but I suppose that in
> order to be compatible to stable this should be the
> change. Am I right?

We always work against upstream first and there freezable_schedule() is
gone. Backports have to be sorted seperately.

Thanks,

tglx