Date: Thu, 2 Jun 2011 10:34:16 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Dmitry Krivenok <krivenok.dmitry@gmail.com> Subject: Re: Bug in ksched_setscheduler? Message-ID: <201106021034.16366.jhb@freebsd.org> In-Reply-To: <BANLkTimNpLSJSgaACjg0PFQONWtOAS1pUQ@mail.gmail.com> References: <BANLkTimNpLSJSgaACjg0PFQONWtOAS1pUQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, June 01, 2011 12:42:42 pm Dmitry Krivenok wrote: > Hello Hackers, > I think I found a bug in ksched_setscheduler() function. > > 209 rtp.prio = p4prio_to_rtpprio(param->sched_priority); > > Shouldn't we use p4prio_to_tsprio instead of p4prio_to_rtpprio at the line 209? > This macro is defined but never used in kernel code: > > $ grep -r 'p4prio_to_tsprio' /usr/src/sys/ > /usr/src/sys/kern/ksched.c:#define p4prio_to_tsprio(P) > ((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) - (P)) > $ > > Is it a real bug or just my misunderstanding of something? I think it is a real bug. Can you come up with a test case to show it? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106021034.16366.jhb>