From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 B32E634E741 for ; Mon, 16 Mar 2026 23:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.218.52 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773704068; cv=pass; b=r2/Iw6CX+fcHegvoZbGe/lJMx//6RGArjF7JfRmHerZVELeMTVjiXY34DO5Dr1DfA8L3ydkRda8lPSoqIBYh/F+JLsIclilEax1hE8hMRWc/F7hqN1PbZe3UFvvG5YUbGVyvgeWTl8xnURH/mtQ5Owq6v7WUE+aIPt7fvfZMm4Y= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773704068; c=relaxed/simple; bh=ytjFQJdCEpwjnd/OWptuHJImz2T11GTVEXwUIVJRY+c=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=T8BY3IMJxkeE1tmFOUqT6S6jFK89xAX2ua4kld7q/L7+HN6gTYe9RI1YSBNCw5J21Q77kATbYJumBYFwFO72yX1mDQlldTV0dmdX6hLalt8E3JVkwDDdAwsC9pAC8YddgTY2QX4FYzYgVMnQB3ullL+IcUiptj8tuuYG/ZPpGV0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=s+p/z/a6; arc=pass smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="s+p/z/a6" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-b8f97c626aaso806812866b.2 for ; Mon, 16 Mar 2026 16:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773704065; cv=none; d=google.com; s=arc-20240605; b=lcNtDBYLh2vnhsz1jTCsMsoCUazy0CqYEgjONpm3yuy91PZWFgQZzWdYfNVO36yqEt Ij4MqGbB95oRX8yrRflGNfAlQrVx+asxk2Og2nqx65GLg1kRFLL/FDH1g6V00vTIejE8 VhvX8Lwic4GrOLFjifUHiWIkz6s/GNwavtbYDkPSm8eoF0vfMheuCKVvIc3uSHWnSOYg JvgmOZyZ83nh3DK/r2W2Rsr56ddomx4x5AHws2LL1G2KrVIdq+stznfxkpE7qhsVESXd nXZmTsn+8/frmd75ih5tUR6lOhWOKFsA7WJEjNbVd5slF2eDSm+obfYelhE77qb6Fkzo oZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FLlFTz6RKXE5yCvAsiurV3uJtIoPVA/1pi4x+qzHH4A=; fh=22NdADgLHHWU+wn1ofSsOtXzsj7EkAU4R1kXaQMDXvY=; b=U9rxOjmnp7Wgh/dtzMiTfR9uv3KYkwSwUgkPvrw1tn97MYcUiGSKtvQeXhnRNzf/g3 dG7c3hyC1HfKh6DhmX040rimUc1h5oiYjsOVLvhk8RdKk+yqZP5pBV1sG0FesND31B29 ZiUgTQvBrLql/E6kFibBfkOI5Zoy6M58ViVnfarTwH2z+dxZS1A8wwSFM6T0nOOWcVVG qnqMsIZG5PMGFBZQsgWy7pgVNYfUnc1PgUABNTfanyLjQjJ3xK52qmZgxfb0WWD3XV3Z 3Axvy6sg0XKHwPV6c/Fxe0S7DI22eDPTjNpzhqvt3c5aMbLpflUAxwMfVIk303AUT7NT O/Xw==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773704065; x=1774308865; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FLlFTz6RKXE5yCvAsiurV3uJtIoPVA/1pi4x+qzHH4A=; b=s+p/z/a6NsUF1aL9pehPjfCRsh6ozTUno2Qlzkr0bnMk4q82xICbUcrpRmTiOLoJzi /WGBTKnfQUsG/aqN3tKCi6rawQuV2PG87wGuoaTi0KFWJp1VXIquVHrO6ipZYY6g4tG3 37vGUQ6OgeM/hJu7wNMEoqKobdOab33L+YcdW3UgQjfnocGoUmqzTTay4mA6ZTVWKTEr lzvOtor9hi2kJBPrpnbxAW3b8mp+R6BLbvlpvZeIHq+8VyJx8v0Hbf1hszi+FishtfIP rlQgkz3okNgl6QNJMwfFWEnR1t8E5nEUrpcMJ7Suul8RucGsy1Y5mc77eSjGAgccafnc 5sew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773704065; x=1774308865; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FLlFTz6RKXE5yCvAsiurV3uJtIoPVA/1pi4x+qzHH4A=; b=q70gTeZnWpoYRFons0HaTSZUBeK65K9V0cOyEkspC0M5GRPtgzBERBdHX7e57peIkl IJ5LV9s+yTwFQ5GmrB6Qmmf9KjKqTcA8XNZOMlldhl5EJcSuKD/BTqvm1lPeDdE3j79t MGEjnQDYkwJB2vfGCLSFkLlLdULzRYvtVFuKuDL5aRY1jLv2PgOtPXD5KhiL9pdBJQF5 KoY0zUDRCE5nW+30PLY8h3Nf1VDAu6Hy36ElOXkVnztzIsVqG6WJG0p9xfOnzLlomELG DTRqJv4Hwk3pCLHhvtD4oNbEucj6ljIyo2Yruy7dcUPp4ZJUxjMq2y7rrK2FbZy7WSQy ejUA== X-Gm-Message-State: AOJu0YxV3e/v0zKvecw4hpHX1p7u1Awiib5TFPMYzl4L80JnxV7NCw41 HSC5UQYZUJ6n7/00X/VqCjVpfagJEGIGiA393gv1HqoB1iwPrPUxPz1cB+825u7+eVHJ43jFOhq etI4HUFV7JpV4ijTWz5hyBJo96WZrvoeU5yTNOa4= X-Gm-Gg: ATEYQzy736/RUdcsywtPNs0l3cIaGGjo+tQe8N9V2ekAUEP3jlVhyQxyVL4b1nAfc8Y RTOwaIDjxx+eJ/b+kvrpIRQzvJMttcX5jcbjE/Q4jpeibTdp3WuzTPqIDW+e2frcW2DYBZ1t6TA N2Pk83XoW4le+t9J2RJZbKdCFvVJbdJjqQtPVLN5sgKmb3rDRxik27g9QNqhoXe9O9AGpKcKugA uOqECE+ckNfhf6HQTG/GtxmcTFNVJO8eI3y60ucR/FZY7cJP+3zrMdqrLs3pmJpR2r29eE6fUAC umzYqzffI7VgbUEtrRbbwOSmVdPVOBNgYo1v X-Received: by 2002:a17:907:9604:b0:b8f:abff:9cf2 with SMTP id a640c23a62f3a-b97650b6feamr885746766b.4.1773704064529; Mon, 16 Mar 2026 16:34:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260313023022.2902479-1-jstultz@google.com> <20260313023022.2902479-9-jstultz@google.com> In-Reply-To: From: John Stultz Date: Mon, 16 Mar 2026 16:34:11 -0700 X-Gm-Features: AaiRm53MqumFxbQhR0XhlEMR62JOeaDmbo46aWqys575ylh7yciK-a8WdPmX0AM Message-ID: Subject: Re: [PATCH v25 8/9] sched: Move attach_one_task and attach_task helpers to sched.h To: K Prateek Nayak Cc: LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Mel Gorman , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 15, 2026 at 9:34=E2=80=AFAM K Prateek Nayak wrote: > On 3/13/2026 8:00 AM, John Stultz wrote: > > +/* > > + * attach_one_task() -- attaches the task returned from detach_one_tas= k() to > > + * its new rq. > > + */ > > +static inline void attach_one_task(struct rq *rq, struct task_struct *= p) > > +{ > > + struct rq_flags rf; > > + > > + rq_lock(rq, &rf); > > nit. We can now use guard(rq_lock)(rq) and save on needing to declare a > "rf". Apart from that, feel free to include: I actually did this in a later patch in the full series, as it seemed more clear I wasn't modifying logic when moving the code: https://github.com/johnstultz-work/linux-dev/commit/8d8a12278d81ce81af6b0= dfd051750f4ce2ec0e5 But, given your feedback, I'll go ahead and fold that fix down to this change and add a note in the commit message. Thanks as always for the review and feedback! -john