Buddy "suspect" code in 2.6 series

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I following the routines for know the implementation of Buddy System
Algorithm in 2.6 kernel series, and i have found a "suspect code" in
buffered_rmqueue routine (mm/page_alloc.c), this and others it's very
different than 2.4 kernel series, this routine start with this code

    if (order == 0) {
        struct per_cpu_pages *pcp;
        pcp = &zone->pageset[get_cpu()].pcp[cold];
        local_irq_save(flags);
        if (pcp->count <= pcp->low)
            pcp->count += rmqueue_bulk(zone, 0,
                        pcp->batch, &pcp->list);
        if (pcp->count) {
            page = list_entry(pcp->list.next, struct page, lru);
            list_del(&page->lru);
            pcp->count--;
        }
        local_irq_restore(flags);
        put_cpu();
    }

I suppose that this new member of zone descriptors, pageset, is a list
of page frames with order 1 in cache, or page assimility per cpu, to
increase performance, it's true ? cold is array of free pages per cpu ?
and hot is used pages per cpu ?

Well , thks in advanced

Pau


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux