[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130304173231.GA5442@redhat.com>
Date: Mon, 4 Mar 2013 18:32:31 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Lianwei Wang <lianwei.wang@...il.com>
Cc: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: PATCH: freezer: add fake signal clearing back when thaw task
On 03/04, 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
> or the related kernel driver has to handle such error.
But if we add recalc_sigpending() we penalize the common case which
doesn't need this.
> And yes, the
> user can handle such case by checking the return value,
Yes.
> 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?
Agreed, it looks strange. It is only for kthreads, I think. And we can
simplify wait_event_freezable() or even kill it.
But if we add new user-space users, I do not know... Fortunately I am
not maintainer ;)
> >> +static void fake_signal_clear(struct task_struct *p)
> >> +{
> >> + unsigned long flags;
> >> +
> >> + if (lock_task_sighand(p, &flags)) {
> >> + recalc_sigpending();
This looks strange. p is always current, otherwise recalc_sigpending()
can't help.
And since it is current you do not need lock_task_sighand().
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists