[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bca7a510-4f66-42b2-b4a7-40b3bd37ead6@redhat.com>
Date: Wed, 31 Jul 2024 14:04:38 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: Dave Jiang <dave.jiang@...el.com>, Rik van Riel <riel@...riel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...ts.ozlabs.org,
Matthew Wilcox <willy@...radead.org>,
Rick P Edgecombe <rick.p.edgecombe@...el.com>,
Oscar Salvador <osalvador@...e.de>, Mel Gorman
<mgorman@...hsingularity.net>, Andrew Morton <akpm@...ux-foundation.org>,
Borislav Petkov <bp@...en8.de>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Huang Ying <ying.huang@...el.com>, "Kirill A . Shutemov"
<kirill@...temov.name>, "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Dan Williams <dan.j.williams@...el.com>, Thomas Gleixner
<tglx@...utronix.de>, Hugh Dickins <hughd@...gle.com>, x86@...nel.org,
Nicholas Piggin <npiggin@...il.com>, Vlastimil Babka <vbabka@...e.cz>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 1/8] mm/dax: Dump start address in fault handler
On 15.07.24 21:21, Peter Xu wrote:
> Currently the dax fault handler dumps the vma range when dynamic debugging
> enabled. That's mostly not useful. Dump the (aligned) address instead
> with the order info.
>
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
> drivers/dax/device.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dax/device.c b/drivers/dax/device.c
> index eb61598247a9..714174844ca5 100644
> --- a/drivers/dax/device.c
> +++ b/drivers/dax/device.c
> @@ -235,9 +235,9 @@ static vm_fault_t dev_dax_huge_fault(struct vm_fault *vmf, unsigned int order)
> int id;
> struct dev_dax *dev_dax = filp->private_data;
>
> - dev_dbg(&dev_dax->dev, "%s: %s (%#lx - %#lx) order:%d\n", current->comm,
> - (vmf->flags & FAULT_FLAG_WRITE) ? "write" : "read",
> - vmf->vma->vm_start, vmf->vma->vm_end, order);
> + dev_dbg(&dev_dax->dev, "%s: op=%s addr=%#lx order=%d\n", current->comm,
> + (vmf->flags & FAULT_FLAG_WRITE) ? "write" : "read",
> + vmf->address & ~((1UL << (order + PAGE_SHIFT)) - 1), order);
>
> id = dax_read_lock();
> if (order == 0)
Agreed, the address of the fault is better. Just wondering, would the
unmasked address be even better? Using the order we can figure out the
to-be-aligned address.
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists