[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YoShWMGVj9ZJbWqT@infradead.org>
Date: Wed, 18 May 2022 00:33:44 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Ira Weiny <ira.weiny@...el.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Dan Williams <dan.j.williams@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V10 33/44] kmap: Make kmap work for devmap protected pages
On Tue, May 17, 2022 at 03:46:55PM -0700, Ira Weiny wrote:
> Ok there is a trade off here which I'm not sure is a good idea.
>
> In order to make kmap faster I carefully placed the devmap_protected() call
> completely inline.[1] This specifically checks the PGMAP_PROTECTION flag in
> dev_pagemap.[1]
>
> I see only 2 ways of not including memremap.h in highmem-internal.h.
>
> 1) Make this check a function call and place it in memremap.c
> 2) Move struct dev_pagemap (and it's dependencies) to another header.
>
> Number 2 negates any positive effect of splitting the header file.
>
> Number 1 is going to force some overhead on all ZONE_DEVICE pages if PMEM is in
> the system.
>
> Do you think the extra run time overhead is a reasonable trade off to
> eliminating the header?
Well, given how big these devmap helpes are it seems like they should be
out of line anyway due to the code size impact. It would be great to
compare the code size for the cases of:
1) baseline kernel
2) devmap protection inline
3) devmap protection out of line
And maybe you need to add linux-mm and Thomas to get a few more
opinions.
Powered by blists - more mailing lists