Re: [PATCH 1/3] mm: document zone device struct page reserved fields

From: Ralph Campbell
Date: Wed Jul 17 2019 - 13:50:27 EST



On 7/16/19 9:38 PM, Christoph Hellwig wrote:
On Tue, Jul 16, 2019 at 09:31:33PM -0700, John Hubbard wrote:
OK, so just delete all the _zd_pad_* fields? Works for me. It's misleading to
calling something padding, if it's actually unavailable because it's used
in the other union, so deleting would be even better than commenting.

In that case, it would still be nice to have this new snippet, right?:

I hope willy can chime in a bit on his thoughts about how the union in
struct page should look like. The padding at the end of the sub-structs
certainly looks pointless, and other places don't use it either. But if
we are using the other fields it almost seems to me like we only want to
union the lru field in the first sub-struct instead of overlaying most
of it.


I like this approach.
I'll work on an updated patch that makes "struct list_head lru" part
of a union with the ZONE_DEVICE struct without the padding and update
the comments and change log.

I will also wait a day or two for others to add their comments.