lkml.org 
[lkml]   [2023]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mm-unstable v4 2/3] mm, printk: introduce new format %pGt for page_type
On Mon 2023-01-30 13:25:13, Hyeonggon Yoo wrote:
> %pGp format is used to display 'flags' field of a struct page.
> However, some page flags (i.e. PG_buddy, see page-flags.h for more details)
> are stored in page_type field. To display human-readable output of
> page_type, introduce %pGt format.
>
> It is important to note the meaning of bits are different in page_type.
> if page_type is 0xffffffff, no flags are set. Setting PG_buddy (0x00000080)
> flag results in a page_type of 0xffffff7f. Clearing a bit actually means
> setting a flag. Bits in page_type are inverted when displaying type names.
>
> Only values for which page_type_has_type() returns true are considered
> as page_type, to avoid confusion with mapcount values. if it returns false,
> only raw values are displayed and not page type names.
>
> Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>

Reviewed-by: Petr Mladek <pmladek@suse.com> # for vsprintf part

I am sorry for the late review. It has somehow fallen through cracks.

Best Regards,
Petr

\
 
 \ /
  Last update: 2023-03-27 00:43    [W:0.066 / U:2.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site