struct pagevec used in Linux page replacement policy

Submitted by sumantakshay
on January 28, 2008 - 8:56am

hi all,

while browsing kernel code i came across "struct pagevec" whose size is 14 and pages referenced are first put into pagevec and then transffered to LRU inactive list when pagevec is full.. or during reclamation lru_add_drain() will transfer pages from pagevec to inactive list... but i am not getting significance of storing pages in pagevec.. please help me out.
Thank you

reading problems?

on
January 29, 2008 - 5:19pm

do you have problems reading and/or understanding the comments in pagevec.h? you must have found this header file because you apparently know its contents.

i read comment and still not

on
February 17, 2008 - 7:09am

i read comment and still not getting its importance, and obviously because of that i posted a question here !!

bucket

on
February 17, 2008 - 5:24pm

instead of carrying water from the well to the house in a spoon, it is more efficient to carry it in a bucket. this is because of the constant time for walking and opening doors and getting exclusive access to the well. but the full bucket (i.e. the contents _and_ the bucket together) should have a good size to handle; together with nr and cold you have 16 pointer-sized members in the structure which fits nicely into the cache lines and is easy to calculate with (if you don't count thumbs and big toes (which may have a special use as carry flags) most humans have 16 fingers and toes altogether).

just look at the 'many places' to get an impression how this is used in reality.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.