From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5F1E361658 for ; Fri, 27 Feb 2026 17:30:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772213401; cv=none; b=EQGA1z2JNcejHt4j3MX1AwxWXBHcMd6KWSKwHHaumTZoymhuILZmzBde1zM7SUVJ6CqCMvQqlYacdKb8Kfr6/W7Rmcx7G64miNiuKsy5wJhlBh+gtxv3RseeG2lHq/ZoQR5g1aXvzcFGsslZid+pIRJIa77KzSrbyMwRR4SzIWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772213401; c=relaxed/simple; bh=np+xzIe6B0yUYO7cpsCcgLQGhWraq7P9H/BmDtbzw0M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YE+iCwJtF2N066lpnscUbS1D1RhosntyaZZj/8zCMmAr0C4AX7Q/rurxeNteoWqjKuqGfnjYqN0TFjHNR1ffbW3hBTMcLlddbqd3qfWdLiwXCmeA8/qHHpqmZEvxIP6YTHRE02EHDo9VKK683L4YLkIhK2oQ5U/RXdG+l822OQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BtpjaPBI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BtpjaPBI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 205B2C116C6; Fri, 27 Feb 2026 17:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772213401; bh=np+xzIe6B0yUYO7cpsCcgLQGhWraq7P9H/BmDtbzw0M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BtpjaPBIDOc7N+IyJFelUinUW4Jg9p5WwvtmQ+80Wo+IgbzDTvgN7E48ejsEX1qVB 5GdXiHVj4KhxGp6RiLC1evTbQ7qHFASgWaGtA/xQEHm6d4coxApo0vVezi97Uzu2bU gSpuLg16D2cgz6ft5G2Yje25IJJplHONr80rf/vDJ/KYHDKH1zit8tzzRwIIqWKXug YMAo2WQOq0IuZHRs8JNQl1jr7oXMXpl4pTtpnHvaOsnnkOvcBWysuq9yreEhPkqZiX QptZUpzoh4nJjeMHLf92iQ53X0pr+JU97rQlpqxVRRj/OxjNcmYNZldi+bJXbLKJLa JO4lWExXAJfzw== Date: Fri, 27 Feb 2026 07:30:00 -1000 From: Tejun Heo To: David Carlier Cc: David Vernet , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched_ext: add unlikely() hints in do_enqueue_task() hot path Message-ID: References: <20260226224425.8819-1-devnexen@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260226224425.8819-1-devnexen@gmail.com> Hello, On Thu, Feb 26, 2026 at 10:44:25PM +0000, David Carlier wrote: > @@ -1360,10 +1360,10 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags, > * is offline and are just running the hotplug path. Don't bother the > * BPF scheduler. > */ > - if (!scx_rq_online(rq)) > + if (unlikely(!scx_rq_online(rq))) > goto local; > > - if (scx_rq_bypassing(rq)) { > + if (unlikely(scx_rq_bypassing(rq))) { > __scx_add_event(sch, SCX_EV_BYPASS_DISPATCH, 1); > goto bypass; both scx_rq_online() and scx_rq_bypassing() have the same likely/unlikely() annotations built into them. Thanks. -- tejun