Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1823130rdb; Wed, 20 Sep 2023 23:50:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3rTsZbDh6iJ7PgenZ8OHKwbOrlIy/6Xi6zr0fSivL1bO0W1yk9F8PvU70vsHFMrk9AH8i X-Received: by 2002:a05:6a20:729a:b0:151:35ad:f331 with SMTP id o26-20020a056a20729a00b0015135adf331mr6783815pzk.14.1695279019021; Wed, 20 Sep 2023 23:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695279019; cv=none; d=google.com; s=arc-20160816; b=FuvPe7KWfMP6wfhkjZyxF4jhD0OQVJ07nByt+cRXbuX6im+6XXiVgm76i5PSlbQc0K tfwNwxTSXreo53UrBTg9LZCwNo3b3U/YFRaNWm5n4eKB359FmPwTgworXPM2PFhn8N5B IFWrkp3OE768zuqGFcFC7pfYR6eu47nUQTlFo6BdFu+AAKlXhxzyjPsLt+/LdYoxD7lq gamm1fclSIkCtLzLWmhfaQfaErCarsUfxKHH0dRxUrkOnmYhowYPgD3btbdEGvLcKxom z+1UZ8908TlNRAVR9gto4ceQreFLpFY3x87lnyfxrmYru8UW/nVrjWAyK24JCh2Kf6CY AHWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=c9DSzP7neHRBccWt8aHapDvhRUFFBzrivV2rjzJSZDo=; fh=y4I4qB1vNrXNeB7Ll1DUj/NxPS6wipIJIHame9j9ma4=; b=u6fqmTqNA5j0bNm9ypY0QiRwjHASE6lhlH30PcKIPI/Tq/rOoHlFyvU0RyLK/Jbbas 3I7QDrUuUasWBVhK0KQ1CSVNhQk5BlAoG6XomTjIzQ9uy0jkLknguRoXPfzU/1e3RHE3 q90eyGG2jKYBhNqdytb8h68sjKf8oP2XZtaL9Uaw8/+LZz7ynhPX34hI4b7q42ClzVP1 FO/9YgBlQpkcpZo/2Iuxg8vmanyTVaOCayuFNC7PDL9QBENtUGsZlqwG3VMlgqDKOYZr uF9QRlOHDlB4G0JADrWj29HHr53gmgwdllh/I1oExyih40bmbfd/ESz43dd3fSTw6npB T4KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tHO1OaQe; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l192-20020a6391c9000000b0054ff53233f2si786262pge.567.2023.09.20.23.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 23:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tHO1OaQe; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 67286802FA74; Wed, 20 Sep 2023 17:14:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229594AbjIUAOM (ORCPT + 99 others); Wed, 20 Sep 2023 20:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjIUAOL (ORCPT ); Wed, 20 Sep 2023 20:14:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9539BCC for ; Wed, 20 Sep 2023 17:14:05 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695255243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c9DSzP7neHRBccWt8aHapDvhRUFFBzrivV2rjzJSZDo=; b=tHO1OaQesFIO/wMvLlRy1LAUR0gMEZ1GFuTP0XC8peC/LIDl9SiC9b7+YhdSkXpeidUIVK mESn0+fGprxWci3yvhrqCTZF25Iob21lEpEvl77YmtS7zmVpINbv2hzTa9QLGVDhXej7pl raR4byT+eIeYxEAeWv03b3SU1etVSqpRwZsPs28U/BsxvkV1yw2vbTzxUYC1KzCuLff7yk CK0eGOucR+gS5tNK4FDK77ENsUOGvsgRFMf0ZLRKD7KiJyK3rQN/05rqUqdlFB98wUfnHy Gu6frw+KqFgX1JRORX8PxOYd2d/0wNEE/CyayJ+0WdhBXxHz9FAMrXFrSzRqWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695255243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c9DSzP7neHRBccWt8aHapDvhRUFFBzrivV2rjzJSZDo=; b=sDL1m0zP/i3HEKhonVEuML1piUiwqH1YfgjFtCy5UjMgp8IYHLeTm0gnOQO6DHESbBkr1V HV2+Mu4eUgn+kpCQ== To: Ankur Arora Cc: Linus Torvalds , Peter Zijlstra , Ankur Arora , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, rostedt@goodmis.org, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com Subject: Re: [PATCH v2 7/9] sched: define TIF_ALLOW_RESCHED In-Reply-To: <875y44va9t.ffs@tglx> References: <20230830184958.2333078-8-ankur.a.arora@oracle.com> <20230908070258.GA19320@noisy.programming.kicks-ass.net> <87zg1v3xxh.fsf@oracle.com> <87edj64rj1.fsf@oracle.com> <87zg1u1h5t.fsf@oracle.com> <20230911150410.GC9098@noisy.programming.kicks-ass.net> <87h6o01w1a.fsf@oracle.com> <20230912082606.GB35261@noisy.programming.kicks-ass.net> <87cyyfxd4k.ffs@tglx> <87led2wdj0.ffs@tglx> <878r90lyai.fsf@oracle.com> <875y44va9t.ffs@tglx> Date: Thu, 21 Sep 2023 02:14:03 +0200 Message-ID: <87zg1gtmb8.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 20 Sep 2023 17:14:12 -0700 (PDT) On Wed, Sep 20 2023 at 22:51, Thomas Gleixner wrote: > On Wed, Sep 20 2023 at 07:22, Ankur Arora wrote: > > The preempt count folding is an optimization which simplifies the > preempt_enable logic: > > if (--preempt_count && need_resched()) > schedule() > to > if (--preempt_count) > schedule() That should be (!(--preempt_count... in both cases of course :)