[Crash-utility] Re: [PATCH] kmem: fix the determination for slab page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi qiwu,

On Tue, Sep 10, 2024 at 7:14 PM <qiwu.chen@xxxxxxxxxxxxx> wrote:
>
> Hi Tao,
> >
> > On Tue, Sep 10, 2024 at 3:20 PM <qiwu.chen(a)transsion.com&gt; wrote:
> >
> > Can we remove this one? I see the value has been changed into a new
> > one since v6.11-rc1.
> >
> > PAGE_TYPE_BASE = 0x80000000
> >
> > Is keeping the value hard coded here necessary?
> >
> I don't think so, since the value can be got from vmcoreinfo after kernel commit ff202303c398e,
> keeping the value hard before kernel commit ff202303c398e:
>   #define PAGE_TYPE_BASE        0xf0000000
>
> So just keeping the original code will get the correct value for any kernel version.
>

Oh I see, it makes sense. How about adding code comments for
PAGE_TYPE_BASE. E.g.

/*
* Before kernel commit ff202303c398e, the value is defined as a macro,
so copy it here;
* After this commit, the value is defined as an enum, which can be
evaluated at runtime.
*/
PAGE_TYPE_BASE = 0x80000000


> >
> > The variable name "pp" doesn't make sense. No one knows what pp is
> > until you read its context.
> >
> Okay, how about renaming "pp" to "page"?

OK, sounds good.

Thanks,
Tao Liu

>
> Thanks
> Qiwu
> --
> Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
> Contribution Guidelines: https://github.com/crash-utility/crash/wiki
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux