From: Jonathan Haws <jhaws@sdl.usu.edu>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "bigeasy@linutronix.de" <bigeasy@linutronix.de>,
"mingo@kernel.org" <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"deepa.kernel@gmail.com" <deepa.kernel@gmail.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>
Subject: Re: [RFC][PATCH] ipc: mqueue: wq_add priority changed to dynamic priority
Date: Mon, 11 Dec 2017 19:54:33 +0000 [thread overview]
Message-ID: <1513022070.2797.13.camel@sdl.usu.edu> (raw)
In-Reply-To: <20171211143241.6b5e627d@gandalf.local.home>
On Mon, 2017-12-11 at 14:32 -0500, Steven Rostedt wrote:
> On Mon, 11 Dec 2017 17:12:05 +0000
> Jonathan Haws <jhaws@sdl.usu.edu> wrote:
>
> >
> > Adding linux-rt-users group to thread.
> > ________________________________________
> > From: Jonathan Haws <jhaws@sdl.usu.edu>
> > Sent: Monday, December 11, 2017 08:37
> > To: mingo@kernel.org; viro@zeniv.linux.org.uk; arnd@arndb.de; akpm@
> > linux-foundation.org; deepa.kernel@gmail.com
> > Cc: linux-kernel@vger.kernel.org; tglx@linutronix.de; bigeasy@linut
> > ronix.de; rostedt@goodmis.org; Jonathan Haws
> > Subject: [RFC][PATCH] ipc: mqueue: wq_add priority changed to
> > dynamic priority
> >
> > Previous behavior added tasks to the work queue using the
> > static_prio value
> > instead of the dynamic priority value in prio. This caused RT tasks
> > to be
> > added to the work queue in a FIFO manner rather than by priority.
> > Normal
> > tasks were handled by priority.
> >
> > This fix utilizes the dynamic priority of the task to ensure that
> > both RT
> > and normal tasks are added to the work queue in priority order.
> > Utilizing
> > the dynamic priority (prio) rather than the base priority
> > (normal_prio) was
> > chosen to ensure that if a task had a boosted priority when it was
> > added to
> > the work queue, it would be woken sooner to to ensure that it
> > releases any
> > other locks it may be holding in a more timely manner. It is
> > understood that
> > the task could have a lower priority when it wakes than when it was
> > added to
> > the queue in this (unlikely) case.
> Probably a better subject would be:
>
> ipc: mqueue: Have RT tasks queue in by priority in wq_add()
Is the best way to change that just to change it in the email thread or
resubmit the patch as v2?
>
> Other than that (and that this doesn't handle DL tasks),
>
> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> -- Steve
>
I'm still new to kernel scheduling details - can you elaborate on what
a DL task is? I'm happy to update the patch to handle DL tasks as well
if it makes sense to do so.
Thanks!
Jon
> >
> >
> > Signed-off-by: Jonathan Haws <jhaws@sdl.usu.edu>
> > ---
> > ipc/mqueue.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ipc/mqueue.c b/ipc/mqueue.c
> > index 9649ecd..cb96db9 100644
> > --- a/ipc/mqueue.c
> > +++ b/ipc/mqueue.c
> > @@ -546,7 +546,7 @@ static void wq_add(struct mqueue_inode_info
> > *info, int sr,
> > ewp->task = current;
> >
> > list_for_each_entry(walk, &info->e_wait_q[sr].list, list) {
> > - if (walk->task->static_prio <= current-
> > >static_prio) {
> > + if (walk->task->prio <= current->prio) {
> > list_add_tail(&ewp->list, &walk->list);
> > return;
> > }
> > --
> > 2.7.4
> >
next prev parent reply other threads:[~2017-12-11 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1513006652-7014-1-git-send-email-jhaws@sdl.usu.edu>
2017-12-11 17:12 ` [RFC][PATCH] ipc: mqueue: wq_add priority changed to dynamic priority Jonathan Haws
2017-12-11 19:32 ` Steven Rostedt
2017-12-11 19:54 ` Jonathan Haws [this message]
2017-12-11 20:15 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513022070.2797.13.camel@sdl.usu.edu \
--to=jhaws@sdl.usu.edu \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=deepa.kernel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox