[linux-mm-cc] Re: CCache problem

Nitin Gupta nitingupta.mail at gmail.com
Tue Jun 27 21:50:06 EDT 2006


Rik van Riel wrote:
			RLQ();
...

-			if (ch->count == 1) kfree (ch);
+			if (put_page_testzero(ch)) kfree(ch);
			RUQ();
			return page;
...

			WLQ();
...
-			if (ch->count == 1) kfree (ch);
+			if (put_page_testzero(ch)) kfree(ch);
			WUQ();

Right now?

> On Tue, 27 Jun 2006, Nitin Gupta wrote:
> 
>> 				RLQ();
> ...
>> 				if (ch->count == 1) kfree (ch);
>> 				RUQ();
>> 				return page;
> 
>> Do you think there are problems in above code?
> 
> Here's one for starters :)
> 
> Could you be in this function with 2 CPUs simultaneously,
> and never free the chunk head?
> 
> 



More information about the linux-mm-cc mailing list