Re: PATCH: freezer: add fake signal clearing back when thaw task

Tejun Heo
2013-03-04T17:02:06Z

Hello,

On Mon, Mar 04, 2013 at 11:24:06AM +0800, Lianwei Wang wrote:
> Freeze/Thaw is a hot path for the Linux based mobile OS, e.g. Android.
> If we don't remove the pending fake signal, then the user space apps

Hotness is relative. How often are we talking about? Do you have any
numbers backing up that this actually makes any difference? The
reason why I'm not convinced is that by the time the control reaches
fake_signal_clear() the system already has done most of the heavy
lifting and the code path which would be excluded by the extra
checking seems pretty short. If you can show otherwise, please do so.

> or the related kernel driver has to handle such error. And yes, the
> user can handle such case by checking the return value, but it mislead
> the user and confuse to them that why wait_event_freezable and friends
> return a error on resume path every time? Can we avoid such useless
> error return?

-ERESTARTSYS may happen without freezing and the syscall path has been
capable of handling it for a very long time. Again, do you have
anything which shows otherwise?

Thanks.

--
tejun