lkml.org 
[lkml]   [2022]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/31] sched_ext: Implement BPF extensible scheduler class
On Mon, Dec 12, 2022 at 07:03:56AM +0100, Julia Lawall wrote:
> > Yeah, scx_exampl_central needs to either set ops.dispatch_max_batch higher
> > according to number of CPUs or flush and exit the loop and retry when
> > scx_bpf_dispatch_nr_slots() reaches zero. Will update.
>
> Since there could be any number of waking threads, maybe some kind of
> flush and retry solution would be better?

Yeah, cental is a bit unusual because it's scheudling for other CPUs too. In
most cases, this doesn't matter that much because whether to retry or not
can be determined by the kernel core code. There are a couple ways to go
about it. When slots run out, it can explicitly queue another scheduling
event on self, or use scx_bpf_consume() to flush the pending tasks. Either
should work but neither is particularly pretty. I'm trying to see whether I
can remove the static dispatch buffers altogether.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2022-12-12 07:09    [W:0.066 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site