Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30265593rwd; Thu, 6 Jul 2023 03:27:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlECv3CmGMEXih9cQ/AHkqxsuPRQxPVS3ds9eTqlImlMf8KKrNklln1ly2CtVDttEvysDuas X-Received: by 2002:a05:6a00:3920:b0:682:4edf:b9c7 with SMTP id fh32-20020a056a00392000b006824edfb9c7mr1668042pfb.2.1688639234889; Thu, 06 Jul 2023 03:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688639234; cv=none; d=google.com; s=arc-20160816; b=elNxNoG3db5W8LKUyL8iMt2CR2gUwZgY2Se+30hySXMhFahaqzed4q7TXnypUAfyo8 410JZGHkWuA9JaINjsmj+XsUPf+bkDfQhZZfn72aoWpy/uzcmoupfoBlIY0yBcP0uiHL UOCBPcbLYLvb1pPnHmXwv+beXQGSi+V5FWO9vHkTGtSCD6m9vsE2BKT3kuchr9D6pTZ2 MsaM5NI499LIk70lDqYA/UJw8L5xeMxR6U8kcEiz2YDe3r/frNTc4KE369IoJhgslp1k CE0iqoJP68l6GPn7YSqMZ3jdRahVFooovkoHP7NWB6b3wUmBu94h9O3+pZ9XixE0lrj+ bpLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zqFF68JzU2bzECIt6xs1L+vFpMo5SJ8CMTxLYC5w9+E=; fh=Zo1Fq1MWukl9d7OK8SXRYod2ZOvK3zlh63QCm5GXtBI=; b=MpVOxVvyGT4xZuab+DFR3Ze5YP81qzawmPH/cthzgdgcTPgNI/5zSRn7pt/gLdrw0X u97SJ5qepi8+lpWtd0ICBiHbMyVpsA/rZnbeoahzI3GCbdfB/8/TwF39wWR7C5dVyGJZ 5FQeezcu4EeRWtuvKIUFBLpAyg5F5pLvb5NNSFJEgGcNXkHmlrlUKD2dAYD+gZ3SyxF1 LldlNWJv3dJrkQpbMF7v+TcH+XzQ1ReZoncGAuURTJ/yjwP19TZIyqOVZiZ1DPRueDZV PX2upJQzJlZWQ/CVqqXyKeCxInsl4A2g2PNTWFrYeeOlpn7EFBWtaD9KRRFUfWKAh4iz BnDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=snLh+kbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a056a000c8b00b00675c97e9214si1265341pfv.28.2023.07.06.03.27.01; Thu, 06 Jul 2023 03:27:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=snLh+kbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbjGFKCA (ORCPT + 99 others); Thu, 6 Jul 2023 06:02:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231628AbjGFKBw (ORCPT ); Thu, 6 Jul 2023 06:01:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02F201986; Thu, 6 Jul 2023 03:01:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0AF05618EC; Thu, 6 Jul 2023 10:01:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAD42C433C8; Thu, 6 Jul 2023 10:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688637709; bh=1uw7peNXWbOZLFcB9mq2BFk7tvD/drZrJVzzlsJCqFE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=snLh+kbUGeVCMoA+6j1NiXgyGq/FjkZbnGTrm9nidVQVXwFkv/QVK3CL/JdJdM6DD Mk/HKookNBQppeS2LPYd8249BnWwqm4wB2vqfiloLXWNRHrYUMi0Z4zu8O6lJVeXcl ETwReQjSDLhKY6oTbxVrRpRplbDZIaziMv0oJAOlYhOqurXwm/n6Il2lb6fXtAmq0B 1nhf0VTZF3pX/pgxr7OcXS1KSRfjTFs6gMLl3gWBfp3aQ4HB5y8TxFmtVk8jpGSdaz sF03Ca3zNDHqfqeHjaHqdg5fmoQgyCM4cSWpq0Yd6oOGBvocG3HDVvgjYE8xKbJwWp G85Mz/024v2zQ== Date: Thu, 6 Jul 2023 12:01:46 +0200 From: Frederic Weisbecker To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, Nicolas Saenz Julienne , Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , "Paul E. McKenney" , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Josh Poimboeuf , Kees Cook , Sami Tolvanen , Ard Biesheuvel , Nicholas Piggin , Juerg Haefliger , Nicolas Saenz Julienne , "Kirill A. Shutemov" , Nadav Amit , Dan Carpenter , Chuang Wang , Yang Jihong , Petr Mladek , "Jason A. Donenfeld" , Song Liu , Julian Pidancet , Tom Lendacky , Dionna Glaze , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Subject: Re: [RFC PATCH 11/14] context-tracking: Introduce work deferral infrastructure Message-ID: References: <20230705181256.3539027-1-vschneid@redhat.com> <20230705181256.3539027-12-vschneid@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 06, 2023 at 12:23:57AM +0200, Frederic Weisbecker wrote: > diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h > index fdd537ea513f..ec3d172601c5 100644 > --- a/include/linux/context_tracking_state.h > +++ b/include/linux/context_tracking_state.h > @@ -10,14 +10,19 @@ > #define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1) > > enum ctx_state { > + /* Following are values */ > CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */ > CONTEXT_KERNEL = 0, > CONTEXT_IDLE = 1, > CONTEXT_USER = 2, > - CONTEXT_GUEST = 3, > - CONTEXT_MAX = 4, > + /* Following are bit numbers */ > + CONTEXT_WORK = 2, > + CONTEXT_MAX = 16, > }; > > +#define CONTEXT_MASK (BIT(CONTEXT_WORK) - 1) > +#define CONTEXT_WORK_MASK ((BIT(CONTEXT_MAX) - 1) & ~(BIT(CONTEXT_WORK) - 1)) > + > /* Even value for idle, else odd. */ > #define RCU_DYNTICKS_IDX CONTEXT_MAX And that should be: #define RCU_DYNTICKS_IDX BIT(CONTEXT_MAX) Did I mention it's not even build tested? :o)