lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1513012323038.16494@sdl.usu.edu>
Date:   Mon, 11 Dec 2017 17:12:05 +0000
From:   Jonathan Haws <jhaws@....usu.edu>
To:     "mingo@...nel.org" <mingo@...nel.org>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "arnd@...db.de" <arnd@...db.de>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "deepa.kernel@...il.com" <deepa.kernel@...il.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "bigeasy@...utronix.de" <bigeasy@...utronix.de>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>
Subject: Re: [RFC][PATCH] ipc: mqueue: wq_add priority changed to dynamic
 priority

Adding linux-rt-users group to thread.
________________________________________
From: Jonathan Haws <jhaws@....usu.edu>
Sent: Monday, December 11, 2017 08:37
To: mingo@...nel.org; viro@...iv.linux.org.uk; arnd@...db.de; akpm@...ux-foundation.org; deepa.kernel@...il.com
Cc: linux-kernel@...r.kernel.org; tglx@...utronix.de; bigeasy@...utronix.de; rostedt@...dmis.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.

Signed-off-by: Jonathan Haws <jhaws@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ