From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751191AbdAWP7l (ORCPT ); Mon, 23 Jan 2017 10:59:41 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:39620 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbdAWP7k (ORCPT ); Mon, 23 Jan 2017 10:59:40 -0500 Date: Mon, 23 Jan 2017 16:59:32 +0100 (CET) From: Thomas Gleixner To: Jens Axboe cc: Chris Wilson , LKML , Hannes Reinecke , Bjorn Helgaas , Chen Fan , Alexander Potapenko , Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH] softirq: Reserve a bit in tasklet.state for the user In-Reply-To: Message-ID: References: <20170123153321.4245-1-chris@chris-wilson.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Jan 2017, Jens Axboe wrote: > On 01/23/2017 08:33 AM, Chris Wilson wrote: > > Allow the user to communicate with the tasklet through the atomic state > > field by assigning a bit for their use. This can be used, for example, > > to differentiate between a tasklet called following an irq or from > > process context, where some hardware state may only be valid after the > > irq. > > > > Signed-off-by: Chris Wilson > > Cc: Thomas Gleixner > > Cc: Jens Axboe > > Cc: Hannes Reinecke > > Cc: Bjorn Helgaas > > Cc: Chen Fan > > Cc: Alexander Potapenko > > --- > > include/linux/interrupt.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h > > index 53144e78a369..ab321552089b 100644 > > --- a/include/linux/interrupt.h > > +++ b/include/linux/interrupt.h > > @@ -542,7 +542,8 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } > > enum > > { > > TASKLET_STATE_SCHED, /* Tasklet is scheduled for execution */ > > - TASKLET_STATE_RUN /* Tasklet is running (SMP only) */ > > + TASKLET_STATE_RUN, /* Tasklet is running (SMP only) */ > > + TASKLET_STATE_USER /* Reserved for use by the owner */ > > }; > > I have no problem making that distinction, but it's impossible to ack > this patch without having seen how you plan to utilize it, as the patch > is meaningless on its own. Right and w/o well defined semantics of this bit it's not at all acceptable. tasklets have vagely semantics already, we really don't need to increase that horror. Thanks, tglx