From: Qian Cai <cai@lca.pw>
To: Pingfan Liu <kernelfans@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@kernel.org>,
kexec@lists.infradead.org, Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Subject: Re: [PATCH] mm/sparse: reset section's mem_map when fully deactivated
Date: Wed, 15 Jan 2020 22:18:01 -0500 [thread overview]
Message-ID: <F12319DE-7ECB-42E5-AF4C-FEFC78B7DAB1@lca.pw> (raw)
In-Reply-To: <1579143668-27941-1-git-send-email-kernelfans@gmail.com>
> On Jan 15, 2020, at 10:01 PM, Pingfan Liu <kernelfans@gmail.com> wrote:
>
> When fully deactivated, it is meaningless to keep the value of a section's
> mem_map. And its mem_map will be reassigned during re-added.
>
> Beside this, it breaks the user space tool "makedumpfile", which makes
> assumption that a hot-removed section having mem_map as NULL.
Well, tools like makedumpfile and the crash utility always has to copy with
low kernel implementation details changes like this. Why is it different this time?
>
> The bug can be reproduced on IBM POWERVM by "drmgr -c mem -r -q 5" ,
> trigger a crash, and save vmcore by makedumpfile
>
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> To: linux-mm@kvack.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: kexec@lists.infradead.org
> Cc: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
> ---
> mm/sparse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/sparse.c b/mm/sparse.c
> index 3822ecb..fddac80 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -789,7 +789,7 @@ static void section_deactivate(unsigned long pfn, unsigned long nr_pages,
> ms->usage = NULL;
> }
> memmap = sparse_decode_mem_map(ms->section_mem_map, section_nr);
> - ms->section_mem_map = sparse_encode_mem_map(NULL, section_nr);
> + ms->section_mem_map = NULL;
> }
>
> if (section_is_early && memmap)
> --
> 2.7.5
>
>
next prev parent reply other threads:[~2020-01-16 3:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 3:01 Pingfan Liu
2020-01-16 3:18 ` Qian Cai [this message]
2020-01-16 3:34 ` Pingfan Liu
2020-01-16 7:50 ` Michal Hocko
2020-01-17 6:22 ` Pingfan Liu
2020-01-17 7:14 ` Dan Williams
2020-01-17 7:47 ` Michal Hocko
2020-01-17 9:49 ` Pingfan Liu
2020-01-17 9:52 ` David Hildenbrand
2020-01-20 2:31 ` Pingfan Liu
2020-01-16 8:06 ` David Hildenbrand
2020-01-16 8:14 ` David Hildenbrand
2020-01-16 8:24 ` Baoquan He
2020-01-16 8:57 ` David Hildenbrand
2020-01-17 6:20 ` Pingfan Liu
2020-01-17 6:18 ` Pingfan Liu
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=F12319DE-7ECB-42E5-AF4C-FEFC78B7DAB1@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=k-hagio@ab.jp.nec.com \
--cc=kernelfans@gmail.com \
--cc=kexec@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=osalvador@suse.de \
/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