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>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Nov 2011 13:42:43 +0800
From:	Wang Sheng-Hui <shhuiw@...il.com>
To:	linux-mm@...ck.org, linux-kernel@...r.kernel.org, mel@....ul.ie
Subject: Question about mm/compaction.c/acct_isolated: computing nr_anon,
 nr_file


Why does it double the number in line 233/234?
 
 222/* Update the number of anon and file isolated pages in the zone */
 223static void acct_isolated(struct zone *zone, struct compact_control *cc)
 224{
 225        struct page *page;
 226        unsigned int count[NR_LRU_LISTS] = { 0, };
 227
 228        list_for_each_entry(page, &cc->migratepages, lru) {
 229                int lru = page_lru_base_type(page);
 230                count[lru]++;
 231        }
 232
 233        cc->nr_anon = count[LRU_ACTIVE_ANON] + count[LRU_INACTIVE_ANON];
 234        cc->nr_file = count[LRU_ACTIVE_FILE] + count[LRU_INACTIVE_FILE];
 235        __mod_zone_page_state(zone, NR_ISOLATED_ANON, cc->nr_anon);
 236        __mod_zone_page_state(zone, NR_ISOLATED_FILE, cc->nr_file);
 237}

thanks,

--
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