diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-02 13:27:50 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-07 23:18:26 -0500 |
commit | 77fcd88de2ae1309c16e4fc35fb90cbc60c3d2ec (patch) | |
tree | f8ba44500c7d06eed1f3c4794759b4226d6a7c09 /mm/slab.h | |
parent | 1054c0f498fcb57de4858313d974aee23daf7376 (diff) |
mm/slub: Make __ksize() fastervmalloc_size
with slab gone, we now have a free u32 in struct slab.
This steals it to make __ksize() faster; it's now a single dependent
load, instead of two. This is going to be important for tracking the
amount of memory stranded by RCU, which we want to be able to do if
we're going to be freeing all pagecache folios (and perhaps all folios)
via RCU.
Cc: linux-mm@kvack.org
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'mm/slab.h')
-rw-r--r-- | mm/slab.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.h b/mm/slab.h index 54deeb0428c6..64f06431cc97 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -84,7 +84,7 @@ struct slab { }; struct rcu_head rcu_head; }; - unsigned int __unused; + unsigned int object_size; atomic_t __page_refcount; #ifdef CONFIG_MEMCG |