[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f3b17ae-bff5-fd0f-cd1e-fa481f100149@suse.cz>
Date: Tue, 2 Nov 2021 15:39:16 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Tang Yizhou <tangyizhou@...wei.com>,
Yunfeng Ye <yeyunfeng@...wei.com>, cl@...ux.com,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: jhubbard@...dia.com, songmuchun@...edance.com, willy@...radead.org,
wuxu.wu@...wei.com, Hewenliang <hewenliang4@...wei.com>
Subject: Re: [PATCH v2] mm, slub: emit the "free" trace report before freeing
memory in kmem_cache_free()
On 11/2/21 14:53, Tang Yizhou wrote:
> On 2021/11/2 19:43, Yunfeng Ye wrote:
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -3526,8 +3526,8 @@ void kmem_cache_free(struct kmem_cache *s, void *x)
>> s = cache_from_obj(s, x);
>> if (!s)
>> return;
>> - slab_free(s, virt_to_head_page(x), x, NULL, 1, _RET_IP_);
>> trace_kmem_cache_free(_RET_IP_, x, s->name);
>> + slab_free(s, virt_to_head_page(x), x, NULL, 1, _RET_IP_);
>> }
>
> It seems that kmem_cache_free() in mm/slab.c has the same problem.
> We can fix it. Thanks.
Doh, true. Should go best before the local_irq_save() there.
And also kmem_cache_free() in mm/slob.c.
Interestingly kfree() is already OK in all 3 implementations.
>> EXPORT_SYMBOL(kmem_cache_free);
>>
>
Powered by blists - more mailing lists