[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YC4rsr9zkNAvdL4T@dhcp22.suse.cz>
Date: Thu, 18 Feb 2021 09:56:18 +0100
From: Michal Hocko <mhocko@...e.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, david@...hat.com,
joaodias@...gle.com
Subject: Re: [PATCH] mm: be more verbose for alloc_contig_range faliures
On Wed 17-02-21 08:36:03, Minchan Kim wrote:
> alloc_contig_range is usually used on cma area or movable zone.
> It's critical if the page migration fails on those areas so
> dump more debugging message like memory_hotplug unless user
> specifiy __GFP_NOWARN.
I agree with David that this has a potential to generate a lot of output
and it is not really clear whether it is worth it. Page isolation code
already has REPORT_FAILURE mode which currently used only for the memory
hotplug because this was just too noisy from the CMA path - d381c54760dc
("mm: only report isolation failures when offlining memory").
Maybe migration failures are less likely to fail but still. Doesn't CMA
allocator provide some useful error reporting on its own?
[...]
> @@ -8736,8 +8747,11 @@ struct page *alloc_contig_pages(unsigned long nr_pages, gfp_t gfp_mask,
> * and cause alloc_contig_range() to fail...
> */
> spin_unlock_irqrestore(&zone->lock, flags);
> +
> + if (zone_idx(zone) != ZONE_MOVABLE)
> + gfp_flags = gfp_mask | __GFP_NOWARN;
Nack to this. Caller shouldn't tweak gfp mask of the caller. If we
really want to control the reporting based on __GFP_NOWARN or a lack of
it then this has to be under control of the caller.
> ret = __alloc_contig_pages(pfn, nr_pages,
> - gfp_mask);
> + gfp_flags);
> if (!ret)
> return pfn_to_page(pfn);
> spin_lock_irqsave(&zone->lock, flags);
> --
> 2.30.0.478.g8a0d178c01-goog
>
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists