Bug 192796 - cut/paste bug in kscand
cut/paste bug in kscand
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Larry Woodman
Brian Brock
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2006-05-23 01:15 EDT by James Washer
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2007-0436
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-11 13:54:19 EDT
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 James Washer 2006-05-23 01:15:36 EDT
Description of problem: bug in kscand source code (I think)
active_anon_count used where active_cache_count should be used. See below.

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

How reproducible:
int kscand(void *unused)
        struct task_struct *tsk = current;
        struct zone_struct * zone;
        unsigned long iv;
        int age;

        strcpy(tsk->comm, "kscand");

        for (;;) {
                for_each_zone(zone) {
                        if (time_before(jiffies, zone->age_next))

                        if (need_active_anon_scan(zone)) {
                                for (age = MAX_AGE-1; age >= 0; age--)  {
                                        scan_active_list(zone, age,
                                        if (current->need_resched)

                        if (need_active_cache_scan(zone)) {
                                for (age = MAX_AGE-1; age >= 0; age--)  {
                                        scan_active_list(zone, age,
SHOULDN'T THIS BE zone->active_cache_count[age]???
                                        if (current->need_resched)

                        iv = zone->age_interval;
                        /* Check if we've been aging quickly enough ... */
                        if (zone->need_scan >= 2)
                                iv = max(iv / 2, MIN_AGING_INTERVAL);
                        /* ... or too quickly. */
                        else if (!zone->need_scan)
                                iv = min(iv + (iv / 2), MAX_AGING_INTERVAL);
                        zone->need_scan = 0;
                        zone->age_interval = iv;
                        zone->age_next = jiffies + iv;
Comment 1 Ernie Petrides 2006-05-23 17:35:12 EDT
Agreed.  This bug was introduced in U6 (-32.12.EL) with this changelog entry:

  - eliminate long system pauses when kscand is running (Larry Woodman)

Too bad the problem hasn't been noticed until now, 5 weeks after U8 code freeze.

RHEL3 is now closed.
Comment 2 James Washer 2006-05-24 02:16:10 EDT
So, are you going to mark this CLOSED/WONTFIX? If not.. what is your plan for 
this bug?

Comment 3 Larry Woodman 2006-05-24 16:37:37 EDT
Hi James.  You are correct this was a cut and paste error on my part.  I think
the reason I(and nobody else) havent noticed it yet is that this part of the
code really doesnt run very often or do very much.  The reason is because active
cache pages dont get aged up and down the way anonymous pages do because they
are typically not mapped.

Have you noticed a problem here or was it found by inspection?

Larry Woodman
Comment 4 James Washer 2006-05-24 18:30:46 EDT
Code inspection.. however, to satisfy my external customer, I'd love to have a 
few minutes to talk with you about possible ramifications.
Any chance we can  chat on the phone, or should be carry on a conversation here.
Comment 5 Larry Woodman 2006-05-25 06:40:42 EDT
Sure, either way.  I'm send you my phone in email.

Comment 6 Ernie Petrides 2006-10-11 15:04:33 EDT
Larry's patch for this was posted for internal review on 20-Sep-2006.
Comment 7 RHEL Product and Program Management 2006-10-24 23:08:23 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 8 Jay Turner 2006-10-25 10:16:42 EDT
QE ack for 3.9.
Comment 9 Ernie Petrides 2006-11-01 18:54:40 EST
A fix for this problem has just been committed to the RHEL3 U9
patch pool this evening (in kernel version 2.4.21-47.3.EL).
Comment 12 Red Hat Bugzilla 2007-06-11 13:54:19 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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