Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 09:06:48AM -0800, Minchan Kim wrote: > On Wed, Mar 10, 2021 at 05:46:56PM +0100, Michal Hocko wrote: > > On Wed 10-03-21 08:05:36, Minchan Kim wrote: > > > On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote: > > [...] > > > > The is a lot of churn indeed. Have you

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 05:46:56PM +0100, Michal Hocko wrote: > On Wed 10-03-21 08:05:36, Minchan Kim wrote: > > On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote: > [...] > > > The is a lot of churn indeed. Have you considered adding $FOO_lglvl > > > variants for those so that you can u

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Michal Hocko
On Wed 10-03-21 08:05:36, Minchan Kim wrote: > On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote: [...] > > The is a lot of churn indeed. Have you considered adding $FOO_lglvl > > variants for those so that you can use them for your particular case > > without affecting most of existing

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 02:07:05PM +0100, Michal Hocko wrote: > On Tue 09-03-21 23:42:46, Minchan Kim wrote: > > On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: > > > > < snip > > > > > > > [...] > > > > > +void dump_migrate_failure_pages(struct list_head *page_list) > > > > > +{ > >

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 02:04:55PM +0100, Michal Hocko wrote: < snip > > > > Also are all those CONFIG_DYNAMIC_DEBUG* ifdefs necessary? Can we > > > simply enable DYNAMIC_DEBUG for page_alloc as I've suggested above? > > > > They are different usecases. > > > > With DYNAMIC_DEBUG_MODULE with C

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Minchan Kim
On Wed, Mar 10, 2021 at 09:20:40AM +0100, David Hildenbrand wrote: > On 10.03.21 08:42, Minchan Kim wrote: > > On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: > > > > < snip > > > > > > > [...] > > > > > +void dump_migrate_failure_pages(struct list_head *page_list) > > > > > +{ > > >

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Michal Hocko
On Wed 10-03-21 13:26:23, Matthew Wilcox wrote: > On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > > Apart from the above, do we have to warn for something that is a > > debugging aid? A similar concern wrt dump_page which uses pr_warn and > > page owner is using even pr_alert. > > W

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Matthew Wilcox
On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > Apart from the above, do we have to warn for something that is a > debugging aid? A similar concern wrt dump_page which uses pr_warn and > page owner is using even pr_alert. > Would it make sense to add a loglevel parameter both into _

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Michal Hocko
On Tue 09-03-21 23:42:46, Minchan Kim wrote: > On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: > > < snip > > > > > [...] > > > > +void dump_migrate_failure_pages(struct list_head *page_list) > > > > +{ > > > > + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, > > > > +

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread Michal Hocko
On Tue 09-03-21 09:27:51, Minchan Kim wrote: > On Tue, Mar 09, 2021 at 05:32:08PM +0100, Michal Hocko wrote: > > On Tue 09-03-21 08:15:41, Minchan Kim wrote: > > > On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > > > > On Mon 08-03-21 12:20:47, Minchan Kim wrote: > > > > > alloc_cont

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-10 Thread David Hildenbrand
On 10.03.21 08:42, Minchan Kim wrote: On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: < snip > [...] +void dump_migrate_failure_pages(struct list_head *page_list) +{ + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, + "migrate failure"); + if (DYNAMIC_

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-09 Thread Minchan Kim
On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: < snip > > > [...] > > > +void dump_migrate_failure_pages(struct list_head *page_list) > > > +{ > > > + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, > > > + "migrate failure"); > > > + if (DYNAMIC_DEBUG_BRANCH(descriptor) &

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-09 Thread Minchan Kim
On Tue, Mar 09, 2021 at 05:32:08PM +0100, Michal Hocko wrote: > On Tue 09-03-21 08:15:41, Minchan Kim wrote: > > On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > > > On Mon 08-03-21 12:20:47, Minchan Kim wrote: > > > > alloc_contig_range is usually used on cma area or movable zone. >

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-09 Thread Michal Hocko
On Tue 09-03-21 08:15:41, Minchan Kim wrote: > On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > > On Mon 08-03-21 12:20:47, 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 > > >

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-09 Thread Minchan Kim
On Tue, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > On Mon 08-03-21 12:20:47, 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. > > I disagree with this

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-09 Thread Michal Hocko
On Mon 08-03-21 12:20:47, 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. I disagree with this statement. alloc_contig_range is not a reliable allocator. Any user, be i

Re: [kbuild-all] Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Minchan Kim
On Tue, Mar 09, 2021 at 08:41:44AM +0800, Rong Chen wrote: > > > On 3/9/21 6:29 AM, Minchan Kim wrote: > > On Tue, Mar 09, 2021 at 05:29:30AM +0800, kernel test robot wrote: > > > Hi Minchan, > > > > > > I love your patch! Perhaps something to improve: > > > > > > [auto build test WARNING on hn

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Minchan Kim
On Mon, Mar 08, 2021 at 04:21:28PM -0800, Andrew Morton wrote: > On Mon, 8 Mar 2021 12:20:47 -0800 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. > > > > pa

Re: [kbuild-all] Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Rong Chen
On 3/9/21 6:29 AM, Minchan Kim wrote: On Tue, Mar 09, 2021 at 05:29:30AM +0800, kernel test robot wrote: Hi Minchan, I love your patch! Perhaps something to improve: [auto build test WARNING on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-page_allo

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread kernel test robot
Hi Minchan, I love your patch! Perhaps something to improve: [auto build test WARNING on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-page_alloc-dump-migrate-failed-pages/20210309-042205 base: https://github.com/hnaz/linux-mm master config: i386-randco

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Andrew Morton
On Mon, 8 Mar 2021 12:20:47 -0800 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. > > page refcount, mapcount with page flags on dump_page are > helpful information

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Minchan Kim
On Tue, Mar 09, 2021 at 05:29:30AM +0800, kernel test robot wrote: > Hi Minchan, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on hnaz-linux-mm/master] > > url: > https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-page_alloc-dump-migrate-failed-pages/

Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread kernel test robot
Hi Minchan, I love your patch! Perhaps something to improve: [auto build test WARNING on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/mm-page_alloc-dump-migrate-failed-pages/20210309-042205 base: https://github.com/hnaz/linux-mm master config: m68k-allmod

[PATCH v2] mm: page_alloc: dump migrate-failed pages

2021-03-08 Thread Minchan Kim
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. page refcount, mapcount with page flags on dump_page are helpful information to deduce the culprit. Furthermore, dump_page_owner was super helpfu