From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BED53BFAED for ; Wed, 26 Aug 2026 10:18:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787739505; cv=none; b=LtD5LhqUabVkHtGLKyNEiKfw6DwnQh/QpmKq2GGLPP+NK7fT0WHWMnFVxY+9EX9TyfQjZLrIUU0MiC48w+MoQBIGCMp+gocr0lSVXNVZLWB8GGaILuQ2RXUlKDunRt+z+2PEl97bJRsqwvoxsqwF2dBhbABR8A06SRlhRsYFCw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787739505; c=relaxed/simple; bh=9a24xu4rEwwVdKZChnfBPimCRlC++xieVXBDNZeF+bc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VWDN2JgBvNK1t9TOIm3qFv/H0PD/pze1dVVmgJKtLxUiIoyMLPsv9UzaVf7laY1GxwS3nfw1GH4s1ud2FgNVew3mbOdbbbhBpNR4QXCHKdOMFsU3FoVBfDzegpYzppp+bSYKQoaIKDASlvAnx4Xu/Xfb2dS58GcWG4DlEbw76Qc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hJheI1lQ; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hJheI1lQ" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-6a5d683b4f7so130451a12.1 for ; Wed, 26 Aug 2026 03:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787739501; x=1788344301; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=z42AM7sOFtnpm8I69atCkQWeOKkWGm4uubjaI1Q02Xw=; b=hJheI1lQD1dGPYN1Ks1OpZeL79VYM6jPKB61G/bxSyLjGFN+ICBMfO/5mvUC1Z5iaL LxgBnEKJgZwZcYrKpXZqgbgn1OYZJwYAJDQM8C9zvw2D7sU1lTW+axSWbgx6rR3tgrLq OMb1PxrsKPNfWcFoDvR619W7ZoXahy+chDAPRNhM61h4242LuLhvrhtLRfJrmZrRsWwy Z2ib4+hYwC6LRTBIcZO3mU2h5E520/tig0Hcznx8hJTjvpiWlFIFifGFVajDcrS1QF2Z u22p/686oFl/y0vTiA6q8BwcR4QGX/aECa0AWnn3QF0dOJaViT2MHgeosW1u9Xk89QkI MZEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787739501; x=1788344301; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=z42AM7sOFtnpm8I69atCkQWeOKkWGm4uubjaI1Q02Xw=; b=fSbGftXV7zqP4+YX8gpU4DZAgHvrJ1ar6/BrmWr68BLrETQfCHwIvUHtF8subs3mWy KfQeMwtaSO9vW7opeqeZHqACg96Bk41inN/eYuhzBM7B6yVWlCG24dFdWG5HhmAspb5y crW9x/LBYTN7/Kuw1bYVSobNjnjItudfOyz2yf+IXsH+cRu+aW8Q93bYffLKebVHPS3V lg7af2dACX6TUFV1UT9n1245FdXFr4PFw6v0ekk/ZsQInTU5u/4TPRlxTngSFT1c2xhJ SMjmrM3k8b8focnuWPW2xS/JQzwF6U1upkWDM+PcYm5WKYMGNeRx7P0/BCeofkmolLjF bnLg== X-Gm-Message-State: AFuF++n8NXub/LKr0neUGrlKDVAp4wmdgMG275EHA2WmP2qktMwcwmNo 7dpNjIeS503PgWXwQTfF1UPkx5TS765+AAhFyjos3NCKd676LZA4A83e X-Gm-Gg: AR+sD11/1tDHn4ncNbTdDN86JJ59s3UCRTzLRsu6oyN44wYA62YxvpHvT9hLsAzb8w/ F9JQRAw59LFKkBa5fdMsIJ5a1P81o9TwRFmdARhni2k4vZLS+eVsbMrhC/7RM6m7vkW4lBbk4lT HDR8wg7l/AxeaNBJr4y0rZBB0hVdpBY0JohmgUBTNMNymrgZb71m+V4ETCW88CwhBH/QZ6BAHTn 4AS37HP1Tu9He3ajllwHK1iimLlTu5I+Dz/0F/R7KCUiTrF9MSOMMQDvS2hcEO1hmAHwTBaA3Kc gw6Yj8HcIEHJFARCUaCfHgjE8FAvZDK9S7znZ1tDsT3fuuCaXJcNyqVpxDBoyxo2NSRS1cDRx1r j9f9CA++omgUaa0seTo32KdIT/krirJqRLD4eXjeobnb6dRCKweXz0S99kLGO9C1grIyUMyola2 HB6ub0rsMJHXly+tVWhznZsiRZiW5YduVu71KEvhxrY6E1rxEpG4gnocLBBQRxHnuHpmdvydTww aGQ1DnpZa8= X-Received: by 2002:a05:6402:5111:b0:6a3:eb13:e74c with SMTP id 4fb4d7f45d1cf-6a5df5e2811mr3968578a12.1.1787739500744; Wed, 26 Aug 2026 03:18:20 -0700 (PDT) Received: from lima-kdev.local ([85.100.66.184]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8b641fsm3942205a12.3.2026.08.26.03.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 03:18:20 -0700 (PDT) From: Kayra Cizmeci To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak Cc: linux-kernel@vger.kernel.org, Kayra Cizmeci Subject: [PATCH v2 0/2] sched/fair: reduce repeated work in enqueue path Date: Wed, 26 Aug 2026 13:15:40 +0300 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260824125223.508178-1-kayracizmeci@gmail.com> References: <20260824125223.508178-1-kayracizmeci@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=UTF-8 Content-Transfer-Encoding: 8bit 1/2: Gather the flags & DELAYED_QUEUE controls in one place. 2/2: give the calculated curr == se onto requeue_delayed_entity() and place_entity() Changelog: 1/2: No changes. 2/2: add (is_curr || curr->on_rq) condition to the check for calculating curr_weight so when both of them are false the curr_weight won't go to waste. v1: https://lore.kernel.org/lkml/20260824125223.508178-1-kayracizmeci@gmail.com/ Kayra Cizmeci (2): sched/fair: reuse the ENQUEUE_DELAYED calculation in enqueue_task_fair() sched/fair: avoid recalculating curr status in place_entity() and requeue_delayed_entity() kernel/sched/fair.c | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) -- 2.53.0