All of lore.kernel.org
 help / color / mirror / Atom feed
From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: kumagai-atsushi@mxc.nes.nec.co.jp
Cc: ptesarik@suse.cz, kexec@lists.infradead.org
Subject: Re: [PATCH v2 2/3] Generic handling of multi-page exclusions
Date: Tue, 15 Apr 2014 17:27:50 +0900 (JST)	[thread overview]
Message-ID: <20140415.172750.504112652.d.hatayama@jp.fujitsu.com> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9720389C@BPXM01GP.gisp.nec.co.jp>

From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Subject: RE: [PATCH v2 2/3] Generic handling of multi-page exclusions
Date: Tue, 15 Apr 2014 04:18:31 +0000

>>> At that time, I chose the current code since it was simpler and safer.
>>> http://www.mail-archive.com/kexec%40lists.infradead.org/msg10207.html
>>>
>>> Don't you like this ?
>>>
>>
>>Sorry. I had forgotten this. We should keep the sanity check
>>there. But in our policy, we should not pass to set_bitmap_cyclic(),
>>pfn and cycle where pfn is not in the cycle. We should chceck that in
>>the caller side and pass pfn in the cycle only.
>>
>>Also, on the current implementation, even if pfn outside a current
>>cycle is passed to set_bitmap_cyclic(), we don't have any means to
>>know that.
>>
>>So, how about warning that only once at runtime?
> 
> Sounds good, it will be helpful to detect bugs in caller side.
> Like this?
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 75092a8..da960ad 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -3361,9 +3361,16 @@ int
>  set_bitmap_cyclic(char *bitmap, unsigned long long pfn, int val, struct cycle *cycle)
>  {
>  	int byte, bit;
> +	static int warning = 0;
>  
> -        if (pfn < cycle->start_pfn || cycle->end_pfn <= pfn)
> +        if (pfn < cycle->start_pfn || cycle->end_pfn <= pfn) {
> +		if (!warning) {
> +			MSG("WARNING: PFN out of cycle range. (pfn:%llx, ", pfn);
> +			MSG("cycle:[%llx-%llx])\n", cycle->start_pfn, cycle->end_pfn);
> +			warning = 1;
> +		}
>                  return FALSE;
> +	}
>  
>  	/*
>  	 * If val is 0, clear bit on the bitmap.
> 

Yes, I thought this logic.

--
Thanks.
HATAYAMA, Daisuke


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-04-15  8:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 17:25 [PATCH v2 0/3] Generic multi-page exclusion Petr Tesarik
2014-04-04 17:25 ` [PATCH v2 1/3] Pass mmd pointer to __exclude_unnecessary_pages Petr Tesarik
2014-04-04 17:25 ` [PATCH v2 2/3] Generic handling of multi-page exclusions Petr Tesarik
2014-04-08  1:49   ` HATAYAMA Daisuke
2014-04-08  6:54     ` Petr Tesarik
2014-04-08  8:19       ` HATAYAMA Daisuke
2014-04-08  9:00         ` Atsushi Kumagai
2014-04-09  7:27           ` HATAYAMA Daisuke
2014-04-15  4:18             ` Atsushi Kumagai
2014-04-15  8:27               ` HATAYAMA Daisuke [this message]
2014-04-15 10:06                 ` Atsushi Kumagai
2014-04-08 10:07         ` Petr Tesarik
2014-04-09  7:12           ` HATAYAMA Daisuke
2014-04-08  7:06     ` Atsushi Kumagai
2014-04-10 10:47       ` Petr Tesarik
2014-04-11  1:59         ` HATAYAMA Daisuke
2014-04-15  1:20           ` Atsushi Kumagai
2014-04-15  6:23             ` Petr Tesarik
2014-04-15  8:09             ` HATAYAMA Daisuke
2014-04-04 17:25 ` [PATCH v2 3/3] Get rid of overrun adjustments Petr Tesarik
2014-04-08  7:02 ` [PATCH v2 0/3] Generic multi-page exclusion Atsushi Kumagai

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=20140415.172750.504112652.d.hatayama@jp.fujitsu.com \
    --to=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=ptesarik@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.