[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230427011717.3vakguhb3lprg5cy@revolver>
Date: Wed, 26 Apr 2023 21:17:17 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
maple-tree@...ts.infradead.org, Petr Mladek <pmladek@...e.com>
Subject: Re: [PATCH 18/34] mm: Update vma_iter_store() to use MAS_WARN_ON()
* Sergey Senozhatsky <senozhatsky@...omium.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.
Powered by blists - more mailing lists