I have one doubt about detail of page reclaim.

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

 



Hi, everyone on LKML.

This is my fourth or fifth send mail to this list. Of course, almost all mail are submit question. and lucky, can get answers soon. thank that every man that reply my question. I understand some kernel skills while I resolved one question. this process is so fun.

   OK, the question at this time:

I am reading code of function balabce_pgdat(pg_data_t *pgdat, int nr_pages, int order).

As the comment said, the argument 'nr_free' is how many pages to free when software suspending . In that function, define a int variable 'to_free' first, and it is assigned to value of 'nr_pages'. but I found both two variables (to_free and nr_pages) didn't change in this function at all, then, Why define variable to_free? And, in middle of this function, there have one if condtion statement
as follow:

       if (nr_pages && to_free > total_reclaimed)
           continue;    /* swsusp: need to do more work */

It's look like to guaruatee release enough pages to satisfy reqire of software suspend. but as
my view, 'nr_pages' and 'to_free' must have same value in this function.
Do here have secret too?

   Waiting for magical answer.




liyu/NOW~

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux