Bug 112284 - Possible typo in linux-2.4.22-ac1-scheduler-update.patch?
Possible typo in linux-2.4.22-ac1-scheduler-update.patch?
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-12-16 21:24 EST by Yue Shi Lai
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-18 01:22:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yue Shi Lai 2003-12-16 21:24:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030922

Description of problem:
While possible effect is unknown, there is a possible typographical
mistake in the Fedora Core's O(1) scheduler interactivity patch backport.

The macro CAN_MIGRATE_TASK is modified by the Con Kolivas O(1)
interactivity patch to static inline int can_migrate_task(task_t *,
runqueue_t *, int, int). The first condition in the original macro

(!idle || (NS_TO_JIFFIES(now - (p)->timestamp) > cache_decay_ticks))

has been negated (by using elementary Boolean algebra) to the first

if (idle && (delta <= JIFFIES_TO_NS(cache_decay_ticks)))
return 0;

which returns 0 (false) if the condition is met.

In linux-2.4.22-ac1-scheduler-update.patch from
kernel-2.4.22-1.2115.nptl.src.rpm , and also contrary to the current
kernel.org 2.6.0-test11 kernel, this condition has been rewritten to

if (!idle && (delta <= JIFFIES_TO_NS(cache_decay_ticks)))
return 0;

(with negation of idle).

Unless there is a good reason, the liklihood for this being a
typographical mistake is very high.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install (unpack) kernel-2.4.22-1.2115.nptl.src.rpm
2. Open linux-2.4.22-ac1-scheduler-update.patch and go to the patch
section @@ -755,21 +1193,39 @@ for kernel/sched.c
3. Go to the third line in can_migrate_task() - and also note the
previous macro variant cited above.

Additional info:
Comment 1 Ingo Molnar 2003-12-17 03:54:30 EST
This function has identical logic to that of 2.6.0-test11. Why do you
think it's "contrary to the current kernel.org 2.6.0-test11 kernel"?
Comment 2 Yue Shi Lai 2003-12-17 15:11:40 EST
OK, first sorry for the incorrect position of difference I gave. Now I
looked through the patch files for 2.6.0-test6 (where this
originates), and there seems to be a difference between
from Con Kolivas and kernel.org's patch-2.6.0-test6.

The issue is still strange, since O20.3int is the patch for O(1)
interactivity, and there has been no comment except a "clean up" of
CAN_MIGRATE_TASK. But since this seems not to be a Red Hat specific
problem, maybe we can close this issue.
Comment 3 Yue Shi Lai 2003-12-18 01:22:35 EST
Now I looked through the Kernel mailing list archives, the inversion
of idle is obviously introduced by Andrew Theurer
<habanero@us.ibm.com> (Wed Aug 27 2003). The way in 2.6.0-test6 and
later, also Fedora Core 1, seems to be the correct one. I think we can
close this issue.

Note You need to log in before you can comment on or make changes to this bug.