r5506 - in glibc-package/branches/eglibc-2.17/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2013-03-11 18:25:28 +0000 (Mon, 11 Mar 2013)
New Revision: 5506
Added:
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-nice.diff
Modified:
glibc-package/branches/eglibc-2.17/debian/changelog
glibc-package/branches/eglibc-2.17/debian/patches/series
Log:
patches/hurd-i386/tg-nice.diff: New patch, fixes nice level granularity.
Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog 2013-03-07 04:25:12 UTC (rev 5505)
+++ glibc-package/branches/eglibc-2.17/debian/changelog 2013-03-11 18:25:28 UTC (rev 5506)
@@ -14,6 +14,7 @@
* patches/hurd-i386/tg-remap_getcwd.diff: New patch, fixes remap translator.
* patches/hurd-i386/tg-af_local_strlen.diff: New patch, fixes using PF_LOCAL
paths without ending \0.
+ * patches/hurd-i386/tg-nice.diff: New patch, fixes nice level granularity.
[ Adam Conrad ]
* debian/debhelper.in/libc.postint: Switch from 'awk gsub' to 'tr -d'
Added: glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-nice.diff
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-nice.diff (rev 0)
+++ glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/tg-nice.diff 2013-03-11 18:25:28 UTC (rev 5506)
@@ -0,0 +1,29 @@
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Subject: [PATCH] Map nice levels 1-to-1 with Mach prio levels
+
+* hurd/hurd/resource.h (MACH_PRIORITY_TO_NICE, NICE_TO_MACH_PRIORITY): Align
+nice levels on Mach priorities from 5 to 45.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ hurd/hurd/resource.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hurd/hurd/resource.h b/hurd/hurd/resource.h
+index b8afc10..ec4273f 100644
+--- a/hurd/hurd/resource.h
++++ b/hurd/hurd/resource.h
+@@ -42,8 +42,8 @@ extern error_t _hurd_priority_which_map (enum __priority_which which, int who,
+
+ /* Convert between Mach priority values and the priority
+ values used by getpriority, setpriority, and nice. */
+-#define MACH_PRIORITY_TO_NICE(prio) (2 * ((prio) - 12))
+-#define NICE_TO_MACH_PRIORITY(nice) (12 + ((nice) / 2))
++#define MACH_PRIORITY_TO_NICE(prio) ((prio) - 25)
++#define NICE_TO_MACH_PRIORITY(nice) ((nice) + 25)
+
+
+
+--
+tg: (4a7fa7e..) t/nice (depends on: baseline)
Modified: glibc-package/branches/eglibc-2.17/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series 2013-03-07 04:25:12 UTC (rev 5505)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series 2013-03-11 18:25:28 UTC (rev 5506)
@@ -119,6 +119,7 @@
hurd-i386/unsubmitted-subhurd.diff
hurd-i386/tg-remap_getcwd.diff
hurd-i386/tg-af_local_strlen.diff
+hurd-i386/tg-nice.diff
i386/local-biarch.diff
i386/local-cmov.diff
Reply to: