lkml.org 
[lkml]   [2003]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: kmem_cache_destroy: Can't free all objects (2.6)
Jozsef Kadlecsik wrote:
> On Thu, 14 Aug 2003, Philippe Elie wrote:
>
>
>>>This happens both with 2.5.74 and 2.6.0-test1.
>>
>>I fixed a bug with exactly this symptom, all object freed but
>>the cache was retaining some object internally. I look 2.6.0-test1
>>and the fix is in, apologies if you already did it correctly
>>but can you double check the bug is really in 2.6.0-test1.
>
>
> Yes. Before I posted my mail I googled a lot and found your fix. I
> checked the source of 2.6.0-test1 and your fix is there of course.

Thanks, I wanted to be sure before digging in the source. Try
the attached patch please.

regards,
Philippe Elie

--- mm/slab.c~ 2003-07-14 03:36:48.000000000 +0000
+++ mm/slab.c 2003-08-15 13:59:34.000000000 +0000
@@ -2349,7 +2349,7 @@
int tofree;

check_spinlock_acquired(cachep);
- if (ac->touched) {
+ if (ac->touched && !force) {
ac->touched = 0;
} else if (ac->avail) {
tofree = force ? ac->avail : (ac->limit+4)/5;
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.068 / U:1.212 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site