From: Michal Hocko <mhocko@suse.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: akpm@linux-foundation.org, jweiner@fb.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm, show_mem: drop pgdat_resize_lock in show_mem()
Date: Thu, 29 Nov 2018 17:18:47 +0100 [thread overview]
Message-ID: <20181129161847.GU6923@dhcp22.suse.cz> (raw)
In-Reply-To: <20181129160524.ewjn2x7spyloitu4@master>
On Thu 29-11-18 16:05:24, Wei Yang wrote:
> On Thu, Nov 29, 2018 at 04:49:22PM +0100, Michal Hocko wrote:
[...]
> >It is only called from __remove_pages and that one calls cond_resched so
> >obviosly not.
> >
>
> Forgive my poor background knowledge, I went throught the code, but not
> found where call cond_resched.
>
> __remove_pages()
> release_mem_region_adjustable()
> clear_zone_contiguous()
> __remove_section()
> unregister_memory_section()
> __remove_zone()
> sparse_remove_one_section()
> set_zone_contiguous()
>
> Would you mind giving me a hint?
This is the code as of 4.20-rc2
for (i = 0; i < sections_to_remove; i++) {
unsigned long pfn = phys_start_pfn + i*PAGES_PER_SECTION;
cond_resched();
ret = __remove_section(zone, __pfn_to_section(pfn), map_offset,
altmap);
map_offset = 0;
if (ret)
break;
}
Maybe things have changed in the meantime but in general the code is
sleepable (e.g. release_mem_region_adjustable does GFP_KERNEL
allocation) and that rules out IRQ context.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-11-29 16:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 21:08 Wei Yang
2018-11-28 22:07 ` Andrew Morton
2018-11-29 1:52 ` Wei Yang
2018-11-29 8:17 ` Michal Hocko
2018-11-29 9:32 ` Wei Yang
2018-11-29 15:04 ` Wei Yang
2018-11-29 15:49 ` Michal Hocko
2018-11-29 16:05 ` Wei Yang
2018-11-29 16:18 ` Michal Hocko [this message]
2018-11-29 23:49 ` Wei Yang
2018-11-29 23:55 ` [PATCH v2] " Wei Yang
2018-11-30 8:17 ` Michal Hocko
2018-11-30 8:54 ` osalvador
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129161847.GU6923@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=jweiner@fb.com \
--cc=linux-mm@kvack.org \
--cc=richard.weiyang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox