[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230427010707.GG1496740@google.com>
Date: Thu, 27 Apr 2023 10:07:07 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: "Liam R. Howlett" <Liam.Howlett@...cle.com>
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()
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", ...);
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()?
Powered by blists - more mailing lists