Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753587AbcCZPMw (ORCPT ); Sat, 26 Mar 2016 11:12:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58091 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbcCZPMt (ORCPT ); Sat, 26 Mar 2016 11:12:49 -0400 Date: Sat, 26 Mar 2016 23:17:13 +0800 From: Minfei Huang To: Baoquan He Cc: Xunlei Pang , Minfei Huang , ebiederm@xmission.com, akpm@linux-foundation.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 0/2] kexec: Make a pair of map/unmap reserved pages in error path Message-ID: <20160326151713.GA28137@dhcp-128-25.nay.redhat.com> References: <1456819349-8650-1-git-send-email-mnfhuang@gmail.com> <56D56684.9000908@redhat.com> <20160323024836.GC2567@x1.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160323024836.GC2567@x1.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 26 Mar 2016 15:12:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2285 Lines: 61 On 03/23/16 at 10:48am, Baoquan He wrote: > On 03/01/16 at 05:53pm, Xunlei Pang wrote: > > This is a bug fix. > > > > After this, I will try to do a cleanup for crash_unmap/map_reserved_pages() > > (only used by S390) to consolidate it with arch_kexec_unprotect/protect_crashkres(). > > Hi Xunlei, Minfei, > > I think you need discuss together about how to do clean up codes in this > place. From my point of view, arch_map/unmap_reserved_pages and > arch_kexec_protect/unprotect_crashkres() are for the same goal but by > different ways on different arch. So for Xunlei's patchset, you might > need to rethink your implementation, the name of function. I personally > think you just implement a x86 specific arch_map/unmap_reserved_pages. > It may need a more generic name, and then add your x86 arch specific > implementation. Sorry I can't see your patches on my mail client, > Xunlei. Since Andrew asked, I just checked these. > > I am fine with Minfei's patch 1/2. But for patch 2/2, it's a little > comfortable to me. Is it really necessary to abstract code block from > kexec_load, then wrap them into a newly added function do_kexec_load()? > Without this wrapping is there a way to do your bug fix? Is there > possibility that do_kexec_load will be called in other places? What's > the benefit to wrap it into do_kexec_load against not wrapping? Hi, Bao. There is a suggestion from Vivek to wrap a new function do_kexec_load to fix this issue, since there are a lot of logic handling in function kexec_load. And this issue doesn't conflict with xlpang@'s patchset, except for code confliction. Thanks Minfei > > Thanks > Baoquan > > > > > Regards, > > Xunlei > > > > On 03/01/2016 at 04:02 PM, Minfei Huang wrote: > > > v1: > > > - Bisect the patch according to Andrew Morton's suggestion > > > > > > Minfei Huang (2): > > > kexec: Make a pair of map/unmap reserved pages in error path > > > kexec: Do a cleanup for function kexec_load > > > > > > kernel/kexec.c | 112 ++++++++++++++++++++++++++++++++------------------------- > > > 1 file changed, 63 insertions(+), 49 deletions(-) > > > > > > > > > _______________________________________________ > > kexec mailing list > > kexec@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/kexec