lkml.org 
[lkml]   [2019]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/4] mm: Use slab_list list_head instead of lru
On Mon, Mar 11, 2019 at 08:49:23PM +0000, Roman Gushchin wrote:
> The patchset looks good to me, however I'd add some clarifications
> why switching from lru to slab_list is safe.
>
> My understanding is that the slab_list fields isn't currently in use,
> but it's not that obvious that putting slab_list and next/pages/pobjects
> fields into a union is safe (for the slub case).

It's already in a union.

struct page {
union {
struct { /* Page cache and anonymous pages */
struct list_head lru;
...
struct { /* slab, slob and slub */
union {
struct list_head slab_list; /* uses lru */
struct { /* Partial pages */
struct page *next;

slab_list and lru are in the same bits. Once this patch set is in,
we can remove the enigmatic 'uses lru' comment that I added.

\
 
 \ /
  Last update: 2019-03-12 00:17    [W:0.124 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site