Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-08-15 Thread Balbir Singh
YAMAMOTO Takashi wrote: >> YAMAMOTO Takashi wrote: + lock_meta_page(page); + /* + * Check if somebody else beat us to allocating the meta_page + */ + race_mp = page_get_meta_page(page); + if (race_mp) { + kfree(mp); + mp = race_mp; >

Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-08-15 Thread YAMAMOTO Takashi
> YAMAMOTO Takashi wrote: > >> + lock_meta_page(page); > >> + /* > >> + * Check if somebody else beat us to allocating the meta_page > >> + */ > >> + race_mp = page_get_meta_page(page); > >> + if (race_mp) { > >> + kfree(mp); > >> + mp = race_mp; > >> + atomic_inc

Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-07-31 Thread Vaidyanathan Srinivasan
YAMAMOTO Takashi wrote: >> +lock_meta_page(page); >> +/* >> + * Check if somebody else beat us to allocating the meta_page >> + */ >> +race_mp = page_get_meta_page(page); >> +if (race_mp) { >> +kfree(mp); >> +mp = race_mp; >> +atomic_inc

Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-07-30 Thread YAMAMOTO Takashi
> + lock_meta_page(page); > + /* > + * Check if somebody else beat us to allocating the meta_page > + */ > + race_mp = page_get_meta_page(page); > + if (race_mp) { > + kfree(mp); > + mp = race_mp; > + atomic_inc(&mp->ref_cnt); > +

[-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-07-27 Thread Balbir Singh
Changelog for v3 1. Fix a probable leak with meta_page's (pointed out by Paul Menage) 2. Introduce a wrapper around mem_container_uncharge for uncharging pages mem_container_uncharge_page() Changelog 1. Improved error handling, uncharge on errors and check to see if we are leaking pages (