Date: Mon, 6 Jun 2011 21:18:14 +0400 From: Dmitry Krivenok <krivenok.dmitry@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Bug in ksched_setscheduler? Message-ID: <BANLkTik6ZHpibUxtox9Y1xL654hckgzDAw@mail.gmail.com> In-Reply-To: <201106021034.16366.jhb@freebsd.org> References: <BANLkTimNpLSJSgaACjg0PFQONWtOAS1pUQ@mail.gmail.com> <201106021034.16366.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I've submitted PR http://www.freebsd.org/cgi/query-pr.cgi?pr=3D157657. Dmitry On Thu, Jun 2, 2011 at 6:34 PM, John Baldwin <jhb@freebsd.org> wrote: > 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 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rtp.prio =3D p4prio_= to_rtpprio(param->sched_priority); >> >> Shouldn't we use p4prio_to_tsprio instead of p4prio_to_rtpprio at the li= ne 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. =A0Can you come up with a test case to show it? > > -- > John Baldwin > --=20 Sincerely yours, Dmitry V. Krivenok e-mail: krivenok.dmitry@gmail.com skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTik6ZHpibUxtox9Y1xL654hckgzDAw>