From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 902CB25EFAE for ; Fri, 5 Dec 2025 13:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764941790; cv=none; b=Td6MbC3ksaP+BJxKkLawp8y7pzWBkmv+08OjwjJgq414KTy+YP/io4I8Gt8VfdDBUCgV5Tu5vtBCdtasJ+ZcpUS8guZ9WEGRD8MlOTXb7nx6nffefzxst6krnXRrF/2lHRFUaj7axrzFlsFL3BMxFwwq+0pIMEm8flXyI2XM7UI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764941790; c=relaxed/simple; bh=I8wjF04/Y1g5PdOZKQ5UmDc5621W4d1+4Ugkr65AMeI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AtWppnxMgtZKVhatA+zQ17EtQgW4IcC+MlSOYVxsimTcTtmL0beISMYhksVSZmT2B3tt+ReeBdy2eWoRZEIaYlWwYgKj3rvJO0IyWudmq1ScwhbocO/ze+dwbaSu8aFbFkV6u6c/8oAXYCbb4QKH9ZF4mkpVoFgeEtbfxwwxMZM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=eYb8YHg9; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eYb8YHg9" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-647a44f6dcaso2804208a12.3 for ; Fri, 05 Dec 2025 05:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764941785; x=1765546585; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PxF6mfyBoVZEO4Kuf7PnC2qyMJKc1x9ltOQuu7F9vOA=; b=eYb8YHg9I283x3mSinOGScTpMdv9iZbpWDYw57S4/TY/ty1N4sZtlEuiFbMNSBKoQp f46OoLWTjGoSD4/w0GWq1ytGNkyTcTIQZr2xSm5rAoATpNSvVUm2qw9czpN1p242qI97 NHdSzWdKD9RuFvw6qSSB+zMG1exMtJdCikHk5PGr6OkaVV1rAkMRBrn1EBEpQH72YiXI s+5SSWZlh+YbCHVZ2y49d5wjY5QphSAaSFr6gZCHcYCvHCa2EsfWtS6I5aOvb9/1vZHt bEc7N/S8zX1f2hFot9V3hRVlbh7W4HgSU9iQ3mfFZSdNVuBWWkBX8j7qYSGnPuvVVkTy oXcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764941785; x=1765546585; h=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=PxF6mfyBoVZEO4Kuf7PnC2qyMJKc1x9ltOQuu7F9vOA=; b=vd4pmZtDcXF+2Ji2V41Lws53r4W2bAynuNLatIO2t6p3WWDbPQa3l5r6vVSH+eNzpm oqedFZbvdRDWcCY3tD+rMTQmuTyMSzaikMltBBoLDDPJ78xPSb5ZHqAglN+1GilB6MGb CM0RGPvJx11NcFUIsHbudKZfo9cqyvq4is/F9StxAbazRH/loyXKh02soRWujZTekc2q 31CJbGS6pGExlkeAkodOaAROdyGp/uUG2HW1QF5VfiHwxXV9lNbV/TJpLO4sei7zDHQA 1210zcjxHwvhIj5GmKoVA9BO1x0POGelJJOOO0BlcBl5iw4iD0yMpgaT484mC2BKMLJQ FX4Q== X-Forwarded-Encrypted: i=1; AJvYcCWqXBQ5dhyZkrX6JpeTEAtQmSfwy4+E25Bfc9b6/0wk7pDSk+/tNWTE7eF8pM0WZBegBY7f5piWbrHfkc8=@vger.kernel.org X-Gm-Message-State: AOJu0YydMOGyIFVHYWo9RRQouyWDfcTxDgmBZuI/CZ5EOAtPt2trvWFr aHBEy9pogJTUEcBlh5NuwqLLUGZlP2+5jN8bje88M+mwDXxeKLI3IZEoGfUBwtbiw/6uzCkjl+l o4WEOl2KoO6s/jIg7ipcNBzN0xwif1N0LZaLeks805w== X-Gm-Gg: ASbGncuSrSm4FbRF3ZfrCOSBP2D2iPbEz0dPWsdExhhW/zRSN69kcJ/7APt71/n7rvb hP4dJPwIlqeWVQzyjhTvJqQnyPznhsRCUV7V33gBjXmNsuQsDwdw1KwSD4hU+VpFWkI+ETzOZy5 7dBpcCNH2pr/3E8tUMgmZzZbGYlGC47DMCF+7UQbdA925IocGN7W05QBu3168eavJaM5mDoO9PJ 1GGaQ3Fow/6G7eOUGCjzQw+ZPWtJpC4Oji+1g/HSOhMOyE63w02aW+Ns/kpBAT8Lw04SnbbSOkK qo8RasRSOXE5I4OiPER8wcNZ X-Google-Smtp-Source: AGHT+IGcr6in7KV+lu0SSLRb/oCsbTcuylTf8CET4KVFxC46k25jvTaG1BCHFSCn0RfwqyRMgzRe+b/nDWnf7mbk/wI= X-Received: by 2002:a05:6402:84a:b0:645:2add:9301 with SMTP id 4fb4d7f45d1cf-6479c5289femr8876555a12.34.1764941783571; Fri, 05 Dec 2025 05:36:23 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20251202181242.1536213-1-vincent.guittot@linaro.org> <20251202181242.1536213-5-vincent.guittot@linaro.org> <20251204112947.GK2528459@noisy.programming.kicks-ass.net> <20251205085912.GQ2528459@noisy.programming.kicks-ass.net> In-Reply-To: From: Vincent Guittot Date: Fri, 5 Dec 2025 14:36:12 +0100 X-Gm-Features: AWmQ_bnVw3c2_CIRk2dgVRP-72oWcqnLxmLUgscVFzToxEJ8a5ls5kUAffKZ3Jc Message-ID: Subject: Re: [PATCH 4/6 v8] sched/fair: Add push task mechanism for fair To: K Prateek Nayak Cc: Peter Zijlstra , mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, pierre.gondois@arm.com, qyousef@layalina.io, hongyan.xia2@arm.com, christian.loehle@arm.com, luis.machado@arm.com Content-Type: text/plain; charset="UTF-8" On Fri, 5 Dec 2025 at 13:49, K Prateek Nayak wrote: > > On 12/5/2025 2:29 PM, Peter Zijlstra wrote: > >>> Why not use move_queued_task() ? > >> > >> double_lock_balance() can fail and prevent being blocked waiting for > >> new rq whereas move_queued_task() will wait, won't it ? > >> > >> Do you think move_queued_task() would be better ? > > > > No, double_lock_balance() never fails, the return value indicates if the > > currently held rq-lock, (the first argument) was unlocked while > > attaining both -- this is required when the first rq is a higher address > > than the second. > > > > double_lock_balance() also puts the wait-time and hold time of the > > second inside the hold time of the first, which gets you a quadric term > > in the rq hold times IIRC. Something that's best avoided. > > > > move_queued_task() OTOH takes the task off the runqueue you already hold > > locked, drops this lock, acquires the second, puts the task there, and > > returns with the dst rq locked. > > So I was experimenting with: > > deactivate_task(rq, p, 0); > set_task_cpu(p, target_cpu); > __ttwu_queue_wakelist(p, target_cpu, 0); > > and nothing has screamed at me yet during the benchmark runs. > Would this be any good instead of the whole lock juggling? > > Since this CPU is found to be going overloaded, pushing via an Just to make sure that we speak about the same thing. With EAS overloaded and overutilized are 2 different things. EAS don't care and some time want to overload a CPU( having more than1 task on the CPU) but EAS is diable once teh CPU becomes overutilized > IPI vs taking the overhead ourselves seems to make more sense > to me from EAS standpoint. I suppose that it's worth trying the IPI on EAS and embedded device > > Given TTWU_QUEUE is disabled for PREEMPT_RT, I'm assuming this > might be problematic too? > > -- > Thanks and Regards, > Prateek >