linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mm: Export 'pageflag_names' array
@ 2013-10-07 17:53 Anatol Pomozov
  2013-10-08  8:06 ` Fengguang Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Anatol Pomozov @ 2013-10-07 17:53 UTC (permalink / raw)
  To: fengguang.wu, LKML; +Cc: gthelen, Dave Anderson

Hi Wu

I have a request wrt your old commit 718a38211.

I think it makes sense to export array pageflag_names so kernel dump
debug tools (like 'crash') can use it as well. Currently the tool
hard-codes flag names but it is suboptimal as flags are different for
different configs.

What do you think? (I can send a patch if you are ok).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mm: Export 'pageflag_names' array
  2013-10-07 17:53 mm: Export 'pageflag_names' array Anatol Pomozov
@ 2013-10-08  8:06 ` Fengguang Wu
  2013-10-08 12:40   ` Dave Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Fengguang Wu @ 2013-10-08  8:06 UTC (permalink / raw)
  To: Anatol Pomozov; +Cc: LKML, gthelen, Dave Anderson

Hi Anatol,

On Mon, Oct 07, 2013 at 10:53:32AM -0700, Anatol Pomozov wrote:
> Hi Wu
> 
> I have a request wrt your old commit 718a38211.
> 
> I think it makes sense to export array pageflag_names so kernel dump
> debug tools (like 'crash') can use it as well. Currently the tool
> hard-codes flag names but it is suboptimal as flags are different for
> different configs.
> 
> What do you think? (I can send a patch if you are ok).

I wonder if the KPF_* defined in

        include/uapi/linux/kernel-page-flags.h

fit your needs. These are kernel page flags exported to the user space
and will be maintained stable and immune to kconfig changes. You can
find use examples of them in

        fs/proc/page.c
        tools/vm/page-types.c

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mm: Export 'pageflag_names' array
  2013-10-08  8:06 ` Fengguang Wu
@ 2013-10-08 12:40   ` Dave Anderson
  2013-10-08 18:28     ` Anatol Pomozov
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Anderson @ 2013-10-08 12:40 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: Anatol Pomozov, LKML, gthelen



----- Original Message -----
> Hi Anatol,
> 
> On Mon, Oct 07, 2013 at 10:53:32AM -0700, Anatol Pomozov wrote:
> > Hi Wu
> > 
> > I have a request wrt your old commit 718a38211.
> > 
> > I think it makes sense to export array pageflag_names so kernel dump
> > debug tools (like 'crash') can use it as well. Currently the tool
> > hard-codes flag names but it is suboptimal as flags are different for
> > different configs.
> > 
> > What do you think? (I can send a patch if you are ok).
> 
> I wonder if the KPF_* defined in
> 
>         include/uapi/linux/kernel-page-flags.h
> 
> fit your needs. These are kernel page flags exported to the user space
> and will be maintained stable and immune to kconfig changes. You can
> find use examples of them in
> 
>         fs/proc/page.c
>         tools/vm/page-types.c
> 
> Thanks,
> Fengguang
> 

Nothing is required for the crash utility.  The pageflag_names array (as well
as the pageflags enumerator) are readily available in the kernel debuginfo
data.

Dave
  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mm: Export 'pageflag_names' array
  2013-10-08 12:40   ` Dave Anderson
@ 2013-10-08 18:28     ` Anatol Pomozov
  2013-10-08 18:37       ` Dave Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Anatol Pomozov @ 2013-10-08 18:28 UTC (permalink / raw)
  To: Dave Anderson; +Cc: Fengguang Wu, LKML, gthelen

Hi

On Tue, Oct 8, 2013 at 5:40 AM, Dave Anderson <anderson@redhat.com> wrote:
>
>
> ----- Original Message -----
>> Hi Anatol,
>>
>> On Mon, Oct 07, 2013 at 10:53:32AM -0700, Anatol Pomozov wrote:
>> > Hi Wu
>> >
>> > I have a request wrt your old commit 718a38211.
>> >
>> > I think it makes sense to export array pageflag_names so kernel dump
>> > debug tools (like 'crash') can use it as well. Currently the tool
>> > hard-codes flag names but it is suboptimal as flags are different for
>> > different configs.
>> >
>> > What do you think? (I can send a patch if you are ok).
>>
>> I wonder if the KPF_* defined in
>>
>>         include/uapi/linux/kernel-page-flags.h
>>
>> fit your needs. These are kernel page flags exported to the user space
>> and will be maintained stable and immune to kconfig changes. You can
>> find use examples of them in
>>
>>         fs/proc/page.c
>>         tools/vm/page-types.c
>>
>> Thanks,
>> Fengguang
>>
>
> Nothing is required for the crash utility.  The pageflag_names array (as well
> as the pageflags enumerator) are readily available in the kernel debuginfo
> data.

D'oh. You are right Dave. Everyone, please ignore my original question
I mislooked this variable in symbols map (or maybe looked at an old
kernel map).

Dave, do you think 'crash' should use pageflag_names to output flag names?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mm: Export 'pageflag_names' array
  2013-10-08 18:28     ` Anatol Pomozov
@ 2013-10-08 18:37       ` Dave Anderson
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Anderson @ 2013-10-08 18:37 UTC (permalink / raw)
  To: Anatol Pomozov; +Cc: Fengguang Wu, LKML, gthelen



----- Original Message -----
> Hi
> 
> On Tue, Oct 8, 2013 at 5:40 AM, Dave Anderson <anderson@redhat.com> wrote:
> >
> >
> > ----- Original Message -----
> >> Hi Anatol,
> >>
> >> On Mon, Oct 07, 2013 at 10:53:32AM -0700, Anatol Pomozov wrote:
> >> > Hi Wu
> >> >
> >> > I have a request wrt your old commit 718a38211.
> >> >
> >> > I think it makes sense to export array pageflag_names so kernel dump
> >> > debug tools (like 'crash') can use it as well. Currently the tool
> >> > hard-codes flag names but it is suboptimal as flags are different for
> >> > different configs.
> >> >
> >> > What do you think? (I can send a patch if you are ok).
> >>
> >> I wonder if the KPF_* defined in
> >>
> >>         include/uapi/linux/kernel-page-flags.h
> >>
> >> fit your needs. These are kernel page flags exported to the user space
> >> and will be maintained stable and immune to kconfig changes. You can
> >> find use examples of them in
> >>
> >>         fs/proc/page.c
> >>         tools/vm/page-types.c
> >>
> >> Thanks,
> >> Fengguang
> >>
> >
> > Nothing is required for the crash utility.  The pageflag_names array (as well
> > as the pageflags enumerator) are readily available in the kernel debuginfo data.
> 
> D'oh. You are right Dave. Everyone, please ignore my original question
> I mislooked this variable in symbols map (or maybe looked at an old
> kernel map).
> 
> Dave, do you think 'crash' should use pageflag_names to output flag names?

It's a good addition -- I'm working on a patch as we speak...

Thanks,
  Dave


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-08 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-07 17:53 mm: Export 'pageflag_names' array Anatol Pomozov
2013-10-08  8:06 ` Fengguang Wu
2013-10-08 12:40   ` Dave Anderson
2013-10-08 18:28     ` Anatol Pomozov
2013-10-08 18:37       ` Dave Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).