From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
To: "d.hatayama@jp.fujitsu.com" <d.hatayama@jp.fujitsu.com>,
"ptesarik@suse.cz" <ptesarik@suse.cz>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: RE: [PATCH v2 2/3] Generic handling of multi-page exclusions
Date: Tue, 15 Apr 2014 01:20:46 +0000 [thread overview]
Message-ID: <0910DD04CBD6DE4193FCF86B9C00BE972037DB@BPXM01GP.gisp.nec.co.jp> (raw)
In-Reply-To: <20140411.105944.62065753.d.hatayama@jp.fujitsu.com>
>From: Petr Tesarik <ptesarik@suse.cz>
>Subject: Re: [PATCH v2 2/3] Generic handling of multi-page exclusions
>Date: Thu, 10 Apr 2014 12:47:17 +0200
>
>> On Tue, 8 Apr 2014 07:06:34 +0000
>> Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> wrote:
>>
>>> [...]
>>> > diff --git a/makedumpfile.h b/makedumpfile.h
>>> >> index 951ed1b..dfad569 100644
>>> >> --- a/makedumpfile.h
>>> >> +++ b/makedumpfile.h
>>> >> @@ -816,6 +816,13 @@ struct mem_map_data {
>>> >> unsigned long long pfn_start;
>>> >> unsigned long long pfn_end;
>>> >> unsigned long mem_map;
>>> >> +
>>> >> + /*
>>> >> + * for excluding multi-page regions
>>> >> + */
>>> >> + unsigned long exclude_pfn_start;
>>> >> + unsigned long exclude_pfn_end;
>>> >
>>> >unsigned long long exclude_pfn_start;
>>> >unsigned long long exclude_pfn_end;
>>> >
>>> >The integers representing page frame numbers need to be defined as
>>> >unsigned long long for architectures where physical address can have
>>> >64-bit length but unsigned long has 32-bit only, such as x86 PAE.
>>> >
>>> >Kumagai-san, I saw this sometimes in the past. How about introducing
>>> >specific abstract type for page frame number like below?
>>> >
>>> >typedef unsigned long long pfn_t;
>>>
>>> Good idea! We should do it.
>>
>> Like the following patch?
>>
>> From 9f3f6876bf1e8c93690097c510dff9982651bfa5 Mon Sep 17 00:00:00 2001
>> From: Petr Tesarik <ptesarik@suse.cz>
>> Date: Thu, 10 Apr 2014 12:40:31 +0200
>> Subject: [PATCH] Introduce the pfn_t type
>>
>> Replace unsigned long long with pfn_t where:
>>
>> a. the variable denotes a PFN
>> b. the variable is a number of pages
>>
>> The number of pages is converted to a pfn_t, because it is a result of
>> subtracting two PFNs or incremented in a loop over a range of PFNs, so
>> it can get as large as a PFN.
>>
>> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
>
>Thanks!
>
>Only concern is that pfn_t could be too generic; could collide with
>symbols from any other libraries. On kernel, I found that kvm and um
>defines pfn_t.
>
>So, it's better to prefix pfn_t with the letters indicating that this
>is relevant to makedumpfile.
>
>But I don't come up with good prefix...
We don't need to be serious, just keeping identity is the important
thing. So how about kdump_pfn_t or mdf_pfn_t?
("makedumpfile" is a long name and it hasn't a good shortening,
it might be better to rename it :-P)
Thanks
Atsushi Kumagai
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-04-15 1:22 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
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 [this message]
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=0910DD04CBD6DE4193FCF86B9C00BE972037DB@BPXM01GP.gisp.nec.co.jp \
--to=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--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.