Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* Re: [PATCH] sched/fair: fix pick_eevdf to always find the correct se
@ 2023-10-05  7:31 Biju Das
  2023-10-05  7:58 ` Biju Das
  2023-10-05 15:02 ` Peter Zijlstra
  0 siblings, 2 replies; 22+ messages in thread
From: Biju Das @ 2023-10-05  7:31 UTC (permalink / raw)
  To: m.szyprowski@samsung.com, bsegall@google.com,
	peterz@infradead.org
  Cc: bristot@redhat.com, bsegall@google.com, chris.hyser@oracle.com,
	corbet@lwn.net, dietmar.eggemann@arm.com, efault@gmx.de,
	gregkh@linuxfoundation.org, joel@joelfernandes.org,
	joshdon@google.com, juri.lelli@redhat.com, kprateek.nayak@amd.com,
	linux-kernel@vger.kernel.org, mingo@kernel.org,
	patrick.bellasi@matbug.net, Pavel Machek, peterz@infradead.org,
	pjt@google.com, qperret@google.com, qyousef@layalina.io,
	rostedt@goodmis.org, tglx@linutronix.de,
	tim.c.chen@linux.intel.com, timj@gnu.org,
	vincent.guittot@linaro.org, youssefesmat@chromium.org,
	yu.c.chen@intel.com, mgorman@suse.de,
	linux-renesas-soc@vger.kernel.org

Subject: Re: [PATCH] sched/fair: fix pick_eevdf to always find the correct se
Date: Wed, 4 Oct 2023 22:39:39 +0200	[thread overview]
Message-ID: <c92bc8a6-225d-4fd2-88b5-8994090fb2de@samsung.com> (raw)
In-Reply-To: <xm261qego72d.fsf_-_@google.com>

Hi,

On 30.09.2023 02:09, Benjamin Segall wrote:
> The old pick_eevdf could fail to find the actual earliest eligible
> deadline when it descended to the right looking for min_deadline, but it
> turned out that that min_deadline wasn't actually eligible. In that case
> we need to go back and search through any left branches we skipped
> looking for the actual best _eligible_ min_deadline.
>
> This is more expensive, but still O(log n), and at worst should only
> involve descending two branches of the rbtree.
>
> I've run this through a userspace stress test (thank you
> tools/lib/rbtree.c), so hopefully this implementation doesn't miss any
> corner cases.
>
> Fixes: 147f3efaa241 ("sched/fair: Implement an EEVDF-like scheduling policy")
> Signed-off-by: Ben Segall <bsegall@google.com>

This patch causing issues [1] in Renesas RZ/G2L SMARC EVK platform. Reverting the patch fixes the warning messages

[1]
[   25.550898] EEVDF scheduling fail, picking leftmost

[   15.109634] ======================================================
[   15.109636] WARNING: possible circular locking dependency detected
[   15.109641] 6.6.0-rc4-next-20231005-arm64-renesas-ga03f9ebbbb4c #1165 Not tainted
[   15.109648] ------------------------------------------------------
[   15.109649] migration/0/16 is trying to acquire lock:
[   15.109654] ffff800081713460 (console_owner){..-.}-{0:0}, at: console_flush_all.constprop.0+0x1a0/0x438
[   15.109694]
[   15.109694] but task is already holding lock:
[   15.109697] ffff00007fbd2298 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0xd0/0xbe0
[   15.109718]
[   15.109718] which lock already depends on the new lock.
[   15.109718]
[   15.109720]
[   15.109720] the existing dependency chain (in reverse order) is:

   25.551560]  __down_trylock_console_sem+0x34/0xb8
[   25.551567]  console_trylock+0x24/0x74
[   25.551574]  vprintk_emit+0x114/0x388
[   25.551581]  vprintk_default+0x34/0x3c
[   25.551588]  vprintk+0x9c/0xb4
[   25.551594]  _printk+0x58/0x7c
[   25.551600]  pick_next_task_fair+0x274/0x480
[   25.551608]  __schedule+0x154/0xbe0
[   25.551616]  schedule+0x48/0x110
[   25.551623]  worker_thread+0x1b8/0x3f8
[   25.551630]  kthread+0x114/0x118
[   25.551635]  ret_from_fork+0x10/0x20
[  OK  ] Started System Logging Service.
[   26.099203] EEVDF scheduling fail, picking leftmost

Cheers,
Biju


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-10-10  2:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-05  7:31 [PATCH] sched/fair: fix pick_eevdf to always find the correct se Biju Das
2023-10-05  7:58 ` Biju Das
     [not found]   ` <ZR6A/lsQMP+ymD1f@chenyu5-mobl2.ccr.corp.intel.com>
2023-10-05  9:31     ` Biju Das
2023-10-05 15:02 ` Peter Zijlstra
2023-10-05 15:08   ` Biju Das
2023-10-06  8:36     ` Marek Szyprowski
2023-10-06  9:38       ` Biju Das
     [not found]     ` <553e2ee4-ab3a-4635-a74f-0ba4cc03f3f9@samsung.com>
2023-10-06 10:31       ` Mike Galbraith
2023-10-06 14:00         ` Peter Zijlstra
2023-10-06 14:39           ` Mike Galbraith
2023-10-06 15:55             ` Peter Zijlstra
2023-10-06 16:54               ` Mike Galbraith
2023-10-06 19:24               ` Peter Zijlstra
2023-10-06 20:15                 ` Marek Szyprowski
2023-10-06 23:27                 ` Mike Galbraith
2023-10-07  0:37                 ` Chen Yu
2023-10-07  6:26                   ` Biju Das
2023-10-07  6:42                     ` Chen Yu
2023-10-09 14:27                       ` Phil Auld
2023-10-10  2:08                         ` Chen Yu
2023-10-07  6:24                 ` Biju Das
2023-10-05 15:11   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox