Bug 192796 - cut/paste bug in kscand
Summary: cut/paste bug in kscand
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Larry Woodman
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-23 05:15 UTC by James Washer
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHSA-2007-0436
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-11 17:54:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0436 0 normal SHIPPED_LIVE Important: Updated kernel packages for Red Hat Enterprise Linux 3 Update 9 2007-06-08 00:03:57 UTC

Description James Washer 2006-05-23 05:15:36 UTC
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;

        daemonize();
        strcpy(tsk->comm, "kscand");
        sigfillset(&tsk->blocked);

        for (;;) {
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(MIN_AGING_INTERVAL);
                for_each_zone(zone) {
                        if (time_before(jiffies, zone->age_next))
                                continue;

                        if (need_active_anon_scan(zone)) {
                                for (age = MAX_AGE-1; age >= 0; age--)  {
                                        scan_active_list(zone, age,
                                                &zone->active_anon_list[age],
                                                zone->active_anon_count[age]);
                                        if (current->need_resched)
                                                schedule();
                                }
                        }

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

                        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 21:35:12 UTC
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 06:16:10 UTC
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 20:37:37 UTC
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 22:30:46 UTC
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 10:40:42 UTC
Sure, either way.  I'm send you my phone in email.

Larry


Comment 6 Ernie Petrides 2006-10-11 19:04:33 UTC
Larry's patch for this was posted for internal review on 20-Sep-2006.


Comment 7 RHEL Program Management 2006-10-25 03:08:23 UTC
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
release.

Comment 8 Jay Turner 2006-10-25 14:16:42 UTC
QE ack for 3.9.

Comment 9 Ernie Petrides 2006-11-01 23:54:40 UTC
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 17:54:19 UTC
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.

http://rhn.redhat.com/errata/RHSA-2007-0436.html



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