Re: sched_child_runs_first doesn't work
I think if it works in that way, it doesn't make sense at all!!!! Parent and child ordering rules should preserve even on different cores! On Fri, Dec 8, 2017 at 9:06 PM, Perr Zhang <strongbox8@zoho.com> wrote:
maybe you should run the program like this:
taskset 1 ./your_test_app
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Sat, 09 Dec 2017 11:04:09 +0330, alireza sanaee said:
I think if it works in that way, it doesn't make sense at all!!!! Parent and child ordering rules should preserve even on different cores!
Find where in kernel/sched.c there's specific code to guarantee that if the child/parent is started on one core, the other isn't scheduled again until after the first one runs, rather than run immediately because it's able to run on an otherwise idle core, so you don't get a 'first' or 'last', but 'at the same time'. And if they run concurrently, the printf output will have a race condition. At that point, the order of output is probably determined by something other than which one scheduled first (the I/O stack or exit() processing being the primary suspects).
participants (3)
-
alireza sanaee -
Perr Zhang -
valdis.kletnieks@vt.edu