* Question about mm/compaction.c/acct_isolated: computing nr_anon, nr_file
@ 2011-11-25 5:42 Wang Sheng-Hui
2011-11-25 8:03 ` Wang Sheng-Hui
0 siblings, 1 reply; 2+ messages in thread
From: Wang Sheng-Hui @ 2011-11-25 5:42 UTC (permalink / raw)
To: linux-mm, linux-kernel, mel
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about mm/compaction.c/acct_isolated: computing nr_anon, nr_file
2011-11-25 5:42 Question about mm/compaction.c/acct_isolated: computing nr_anon, nr_file Wang Sheng-Hui
@ 2011-11-25 8:03 ` Wang Sheng-Hui
0 siblings, 0 replies; 2+ messages in thread
From: Wang Sheng-Hui @ 2011-11-25 8:03 UTC (permalink / raw)
To: linux-mm, linux-kernel, mel
On 2011a1'11ae??25ae?JPY 13:42, Wang Sheng-Hui wrote:
>
> 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,
>
Sorry, I mistook looking the code. Please ignore the mail.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-25 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 5:42 Question about mm/compaction.c/acct_isolated: computing nr_anon, nr_file Wang Sheng-Hui
2011-11-25 8:03 ` Wang Sheng-Hui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).