lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 16 Jun 2011 00:34:39 +0000 (UTC)
From:	Steve Chiang <windtracekimo@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Question about page count

Hi, 
i am currently analyzing the memory pages footprint in 2.6.18.8 kernel (1GB ram,
32-bit, Flat model, no NUMA), and got a question. Does page_count(page)==0
really means the page is free because the source code says so?

If I just traverse mem_map for all memory descriptor, and count how many of them
has page_count 0, then the number of free page will exceed the MemFree number
reported from /proc/meminfo (actually from the zone list).

After some investigation, I figure out that page->flags actually encode the zone
information (DMA, NORMAL, HIGHMEM), and some of the page descriptors do not have
correct zone number. But filtering them out doesn't help.

In my case, HIGHMEM has 61 free pages reported by /proc/meminfo, but when I
traverse the page descriptors array from (896MB - 1024MB), I count the pages with
(1) flags stating its zone == ZONE_HIGHMEM
(2) page_count(page)==0
My result is 186 but not 61.

Could anyone help on explaining this?

Thanks,
Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ