[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121225110742.GA7720@liondog.tnic>
Date: Tue, 25 Dec 2012 12:07:42 +0100
From: Borislav Petkov <bp@...en8.de>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, Tony Luck <tony.luck@...el.com>,
linux-edac@...r.kernel.org
Subject: Re: [PATCH 15/25] x86/mce: don't use [delayed_]work_pending()
On Fri, Dec 21, 2012 at 05:57:05PM -0800, Tejun Heo wrote:
> There's no need to test whether a (delayed) work item in pending
> before queueing, flushing or cancelling it. Most uses are unnecessary
> and quite a few of them are buggy.
>
> Remove unnecessary pending tests from x86/mce. Only compile tested.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Tony Luck <tony.luck@...el.com>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: linux-edac@...r.kernel.org
> ---
> Please let me know how this patch should be routed. I can take it
> through the workqueue tree if necessary.
>
> Thanks.
>
> arch/x86/kernel/cpu/mcheck/mce.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 80dbda8..c06a736 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -514,8 +514,7 @@ static void mce_schedule_work(void)
> {
> if (!mce_ring_empty()) {
> struct work_struct *work = &__get_cpu_var(mce_work);
> - if (!work_pending(work))
> - schedule_work(work);
> + schedule_work(work);
Right, just a nit. You could remove the local variable and have the
function simply be:
static void mce_schedule_work(void)
{
if (!mce_ring_empty())
schedule_work(&__get_cpu_var(mce_work));
}
before you send it upstream.
Also, the workqueue stuff is used on Intel boxes to poke mcelog when
there's an MCE to be reported to userspace so if Tony wants to give it a
run...
I'm fine with this being routed through your tree:
Acked-by: Borislav Petkov <bp@...en8.de>
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
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