From: Pengfei Li <lpf.vector@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
rpenyaev@suse.de, peterz@infradead.org, guro@fb.com,
rick.p.edgecombe@intel.com, rppt@linux.ibm.com,
aryabinin@virtuozzo.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size
Date: Fri, 12 Jul 2019 23:09:00 +0800 [thread overview]
Message-ID: <CAD7_sbEoGRUOJdcHnfUTzP7GfUhCdhfo8uBpUFZ9HGwS36VkSg@mail.gmail.com> (raw)
In-Reply-To: <20190712134955.GV32320@bombadil.infradead.org>
On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox <willy@infradead.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?
next prev parent reply other threads:[~2019-07-12 15:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 12:02 [PATCH v4 0/2] mm/vmalloc.c: improve readability and rewrite vmap_area Pengfei Li
2019-07-12 12:02 ` [PATCH v4 1/2] mm/vmalloc: do not keep unpurged areas in the busy tree Pengfei Li
2019-07-12 12:02 ` [PATCH v4 2/2] mm/vmalloc.c: Modify struct vmap_area to reduce its size Pengfei Li
2019-07-12 13:49 ` Matthew Wilcox
2019-07-12 15:09 ` Pengfei Li [this message]
2019-07-15 14:27 ` Uladzislau Rezki
2019-07-15 15:14 ` Pengfei Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAD7_sbEoGRUOJdcHnfUTzP7GfUhCdhfo8uBpUFZ9HGwS36VkSg@mail.gmail.com \
--to=lpf.vector@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=rpenyaev@suse.de \
--cc=rppt@linux.ibm.com \
--cc=urezki@gmail.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).