From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbdAWPoV (ORCPT ); Mon, 23 Jan 2017 10:44:21 -0500 Received: from mail-io0-f182.google.com ([209.85.223.182]:36396 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbdAWPoU (ORCPT ); Mon, 23 Jan 2017 10:44:20 -0500 Subject: Re: [PATCH] softirq: Reserve a bit in tasklet.state for the user To: Chris Wilson , linux-kernel@vger.kernel.org References: <20170123153321.4245-1-chris@chris-wilson.co.uk> Cc: Thomas Gleixner , Hannes Reinecke , Bjorn Helgaas , Chen Fan , Alexander Potapenko From: Jens Axboe Message-ID: Date: Mon, 23 Jan 2017 08:44:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170123153321.4245-1-chris@chris-wilson.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Jens Axboe