[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD7_sbEoGRUOJdcHnfUTzP7GfUhCdhfo8uBpUFZ9HGwS36VkSg@mail.gmail.com>
Date: Fri, 12 Jul 2019 23:09:00 +0800
From: Pengfei Li <lpf.vector@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Uladzislau Rezki <urezki@...il.com>, rpenyaev@...e.de,
peterz@...radead.org, guro@...com, rick.p.edgecombe@...el.com,
rppt@...ux.ibm.com, aryabinin@...tuozzo.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce
its size
On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote:
>
> I don't think you need struct union struct union. Because llist_node
> is just a pointer, you can get the same savings with just:
>
> union {
> struct llist_node purge_list;
> struct vm_struct *vm;
> unsigned long subtree_max_size;
> };
>
Thanks for your comments.
As you said, I did this in v3.
https://patchwork.kernel.org/patch/11031507/
The reason why I use struct union struct in v4 is that I want to
express "in the tree" and "in the purge list" are two completely
isolated cases.
struct vmap_area {
union {
struct { /* Case A: In the tree */
...
};
struct { /* Case B: In the purge list */
...
};
};
};
The "rb_node" and "list" should also not be used when va is in
the purge list
what do you think of this idea?
Powered by blists - more mailing lists