lkml.org 
[lkml]   [2024]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] slub: use count_partial_free_approx() in slab_out_of_memory()
On Fri, 19 Apr 2024, Jianfeng Wang wrote:

> slab_out_of_memory() uses count_partial() to get the exact count
> of free objects for each node. As it may get called in the slab
> allocation path, count_partial_free_approx() can be used to avoid
> the risk and overhead of traversing a long partial slab list.
>
> At the same time, show_slab_objects() still uses count_partial().
> Thus, slub users can still have the option to access the exact
> count of objects via sysfs if the overhead is acceptable to them.
>
> Signed-off-by: Jianfeng Wang <jianfeng.w.wang@oracle.com>

Acked-by: David Rientjes <rientjes@google.com>

\
 
 \ /
  Last update: 2024-04-20 02:18    [W:0.104 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site