Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3551027rwo; Mon, 24 Jul 2023 12:48:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQ7M4csU0u5w7SvPJXvrj05fWpKnw6rhg2vQRlzg8qZe/B5FWKjN1B9rOrCfWWhBrhd4R7 X-Received: by 2002:a17:906:2086:b0:991:fef4:bb7 with SMTP id 6-20020a170906208600b00991fef40bb7mr10911128ejq.73.1690228139576; Mon, 24 Jul 2023 12:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690228139; cv=none; d=google.com; s=arc-20160816; b=RwbMGf8JipSoTj0IpJiV2IKseUOxwaW/ks+HZMoO2l7k4c6nqUbNC0SVChS9OE3IEh rBOuHw3SqOZZCJPMifD8nzl8EXlmIyf7FEHN3V2W4jGWs0YBFtgcmN9A9DY/Z0QUEHdP x2z/qK+2lvlOc0wDeBUJMq6Rn2cKNTX2t+xGBT3GZSFfRdLVFmaqxJXSmAF+ETq7dGx/ DRkLLbn7CUbj//CQACw6tSfJNSAgRhSP59GOLWhrQKrqAewmhqZpefzo4ryGaQctPazI 31WexIkuOHQ5J70rwVVWZyEe5sMmAIdz44yCeLmRTmlsOZ/pegNRvuJ21U4M0TGCmd0f T1Yg== 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=vQWR2kz9iG9DYlC/w3tTVvEE05ft20Ao9ZpDrBjCNAo=; fh=UDdLcVnRzVL9kbrN0nPkTv0fpTs38YwP1d4lMzEsUJg=; b=STSq47l6Q8GkNjjEJNUdd3USv+miWKVWeLBiRgz+74ICBFuPMgnOL/msuEV8KgtS3f uhNbEOoB6A1ZPp62jQglhrtxVb2zmrPIYjhmcV2706nuGvTKFu2Xm4oe6sxUlJtlaSam lht+SlRCYIcXFNh0GYWZU6vzoBAxfA/+Uct2j0euLhysvrA/r4pblKwSYMhiN/KBD7LN lBLZ3MBvlxLkr7VkSmCfsmaXF0Cww22BSLawsKD4A0pvWL813RcfM+8vcv09Pdl6ust7 mTklmktg9/litws8Rg1ocP6zyMCtbzvjttfNMp8qVzI/Um2HMUuc5bBLFMKfxMciawFC 55Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z5AG13I0; 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 o1-20020a170906288100b00965a6d6b536si6769153ejd.335.2023.07.24.12.48.35; Mon, 24 Jul 2023 12:48:59 -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=Z5AG13I0; 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 S230455AbjGXTTE (ORCPT + 99 others); Mon, 24 Jul 2023 15:19:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjGXTTC (ORCPT ); Mon, 24 Jul 2023 15:19:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC24B122; Mon, 24 Jul 2023 12:19:01 -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 385EB6133D; Mon, 24 Jul 2023 19:19:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAAD8C433C7; Mon, 24 Jul 2023 19:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690226340; bh=+LZ4eYxU8Ln7Boi9fvVDKSeBa0mdLKhS5TxPxP6U5z0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z5AG13I0eH3r/+JSxGx9V3KuQ5ylHVmcPa9CYhTBkOLcUC66vL7aUBLfmCEWqCzs1 kd9VaGz4WlPaTpBu9omhaYQsqJONitcO0G7YTsH8ytsIisX70dDfHM0UeGfGEFA1wh E8Xhox9lBrf3cJzEYVfWEOWPDBWsCC/cy+8NBlnfSkjhTz10yjXYJNMOiI8SkmbneQ Om6JFX5LOy7ta8iPjHIZgupC1tbyg4AlfXomMtY3a4A0vOYBOYMi4dxdQhXyqUdoeZ p0rTqA6x7c6miitYlN49KP50tlIssxGzF2fzCfCe7ARt9xAtTfki69TnzMu46eGMVG uuDqcdB6qdZuQ== Date: Mon, 24 Jul 2023 21:18:57 +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, rcu@vger.kernel.org, linux-kselftest@vger.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" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Josh Poimboeuf , Jason Baron , 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 v2 15/20] context-tracking: Introduce work deferral infrastructure Message-ID: References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-16-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Mon, Jul 24, 2023 at 05:55:44PM +0100, Valentin Schneider wrote: > I can make that a 'do {} while ()' instead to force at least one execution > of the cmpxchg(). > > This is only about reducing the race window, right? If we're executing this > just as the target CPU is about to enter userspace, we're going to be in > racy territory anyway. Regardless, I'm happy to do that change. Right, it's only about narrowing down the race window. It probably don't matter in practice, but it's one less thing to consider for the brain :-) Also, why bothering with handling CONTEXT_IDLE? Thanks.