linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SCHED_DEADLINE, sched_getscheduler(), and sched_getparam()
@ 2014-05-12 12:09 Michael Kerrisk (man-pages)
       [not found] ` <CAKgNAkiA23kAFyXQkFV4z0aUE+y5K7AFNwRW+4LqwAyVj=tQtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-05-12 12:09 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Juri Lelli, Dario Faggioli, lkml, linux-man, Michael Kerrisk

Hi Peter,

Looking at the code of sched_getparam() and sched_setscheduler() (to
see what might need to land in the man pagea with respect to
SCHED_DEADLINE changes), I see that the former fails (EINVAL) if the
target is a SCHED_DEADLINE process, while the latter succeeds
(returning SCHED_DEADLINE).

The sched_setscheduler() seems fine, but what's the rationale for
having sched_getparam() fail in this case, rather than just returning
a sched_priority of zero (since sched_priority is in any case unused,
as for SCHED_OTHER, right)? My point is that the change seems to
needlessly break applications that employ sched_getparam(). Maybe I am
missing something...

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-05-22 12:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 12:09 SCHED_DEADLINE, sched_getscheduler(), and sched_getparam() Michael Kerrisk (man-pages)
     [not found] ` <CAKgNAkiA23kAFyXQkFV4z0aUE+y5K7AFNwRW+4LqwAyVj=tQtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-12 12:24   ` Peter Zijlstra
2014-05-12 12:33     ` Michael Kerrisk (man-pages)
2014-05-12 15:25       ` Peter Zijlstra
     [not found]         ` <20140512152536.GR30445-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2014-05-12 19:42           ` Michael Kerrisk (man-pages)
     [not found]             ` <53712434.2060705-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-12 20:50               ` Peter Zijlstra
2014-05-19 13:06                 ` [tip:sched/core] peter_zijlstra-sched-change_sched_getparam_behaviour_vs_sched_deadline tip-bot for Peter Zijlstra
2014-05-22 12:25                 ` [tip:sched/core] sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE tip-bot for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).