Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627402
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: your mail |
| Date | 2017-04-20 14:20 +0200 |
| Message-ID | <tyje1-o7-5@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <txa37-6NZ-1@gated-at.bofh.it> <ty94Z-2qb-3@gated-at.bofh.it> <tyeHn-60B-1@gated-at.bofh.it> <tyfWO-6GX-21@gated-at.bofh.it> <tyiUF-8tO-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 20-04-17 13:56:34, Vlastimil Babka wrote:
> On 04/20/2017 10:49 AM, Michal Hocko wrote:
> > On Thu 20-04-17 09:28:20, Michal Hocko wrote:
> >> On Thu 20-04-17 10:27:55, Joonsoo Kim wrote:
> > [...]
> >>> Your patch try to add PageReserved() to __pageblock_pfn_to_page(). It
> >>> woule make that zone->contiguous usually returns false since memory
> >>> used by memblock API is marked as PageReserved() and your patch regard
> >>> it as a hole. It invalidates set_zone_contiguous() optimization and I
> >>> worry about it.
> >>
> >> OK, fair enough. I did't consider memblock allocations. I will rethink
> >> this patch but there are essentially 3 options
> >> - use a different criterion for the offline holes dection. I
> >> have just realized we might do it by storing the online
> >> information into the mem sections
> >> - drop this patch
> >> - move the PageReferenced check down the chain into
> >> isolate_freepages_block resp. isolate_migratepages_block
> >>
> >> I would prefer 3 over 2 over 1. I definitely want to make this more
> >> robust so 1 is preferable long term but I do not want this to be a
> >> roadblock to the rest of the rework. Does that sound acceptable to you?
> >
> > So I've played with all three options just to see how the outcome would
> > look like and it turned out that going with 1 will be easiest in the
> > end. What do you think about the following? It should be free of any
> > false positives. I have only compile tested it yet.
>
> That looks fine, can't say immediately if fully correct. I think you'll
> need to bump SECTION_NID_SHIFT as well and make sure things still fit?
> Otherwise looks like nobody needed a new section bit since 2005, so we
> should be fine.
You are absolutely right. Thanks for spotting this! I have folded this
in
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 611ff869fa4d..c412e6a3a1e9 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1166,7 +1166,7 @@ extern unsigned long usemap_size(void);
#define SECTION_IS_ONLINE (1UL<<2)
#define SECTION_MAP_LAST_BIT (1UL<<3)
#define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1))
-#define SECTION_NID_SHIFT 2
+#define SECTION_NID_SHIFT 3
static inline struct page *__section_mem_map_addr(struct mem_section *section)
{
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
(none) Michal Hocko <mhocko@kernel.org> - 2017-04-15 14:20 +0200
[PATCH 2/3] mm, compaction: skip over holes in __reset_isolation_suitable Michal Hocko <mhocko@kernel.org> - 2017-04-15 14:20 +0200
Re: your mail Joonsoo Kim <js1304@gmail.com> - 2017-04-17 07:50 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-17 10:20 +0200
Re: your mail Joonsoo Kim <js1304@gmail.com> - 2017-04-20 03:30 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-20 09:30 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-20 10:50 +0200
Re: your mail Vlastimil Babka <vbabka@suse.cz> - 2017-04-20 14:00 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-20 14:20 +0200
Re: your mail Joonsoo Kim <js1304@gmail.com> - 2017-04-21 06:40 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-21 09:20 +0200
Re: your mail Joonsoo Kim <js1304@gmail.com> - 2017-04-24 03:50 +0200
Re: your mail Michal Hocko <mhocko@kernel.org> - 2017-04-24 10:00 +0200
csiph-web