lkml.org 
[lkml]   [2023]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 18/34] mm: Update vma_iter_store() to use MAS_WARN_ON()
* Sergey Senozhatsky <senozhatsky@chromium.org> [230426 21:07]:
> Cc-ing Petr
>
> On (23/04/25 10:09), Liam R. Howlett wrote:
> > + if (MAS_WARN_ON(&vmi->mas, vmi->mas.node != MAS_START &&
> > + vmi->mas.index > vma->vm_start)) {
> > + printk("%lx > %lx\n", vmi->mas.index, vma->vm_start);
> > + printk("store of vma %lx-%lx", vma->vm_start, vma->vm_end);
> > + printk("into slot %lx-%lx", vmi->mas.index, vmi->mas.last);
> > }
>
> [..]
>
> > + if (MAS_WARN_ON(&vmi->mas, vmi->mas.node != MAS_START &&
> > + vmi->mas.last < vma->vm_start)) {
> > + printk("%lx < %lx\n", vmi->mas.last, vma->vm_start);
> > + printk("store of vma %lx-%lx", vma->vm_start, vma->vm_end);
> > + printk("into slot %lx-%lx", vmi->mas.index, vmi->mas.last);
> > }
>
> Any reason for "store of vma" and "into slot" to be two separate
> printk()-s? It's not guaranteed that these will be printed as a
> continuous line. A single printk should work fine:
>
> pr_foo("store of vma %lx-%lx into slot %lx-%lx", ...);
>

Really, just for readability. I'll split the string literal instead.

> The line probably needs to be terminated with \n unless you expect
> more pr_cont() printks after this, which doesn't look like a case.
> Additionally, do you want to pass a specific loglevel? E.g. pr_debug()?

Yes, I should do both of these, thanks.

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