From patchwork Mon Aug 12 18:12:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13760906 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46492C52D7C for ; Mon, 12 Aug 2024 18:12:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B23196B008A; Mon, 12 Aug 2024 14:12:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD2886B008C; Mon, 12 Aug 2024 14:12:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 973806B0095; Mon, 12 Aug 2024 14:12:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7A33D6B008A for ; Mon, 12 Aug 2024 14:12:36 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 2366AA032A for ; Mon, 12 Aug 2024 18:12:36 +0000 (UTC) X-FDA: 82444388712.05.9F3AECC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf08.hostedemail.com (Postfix) with ESMTP id 96FD6160013 for ; Mon, 12 Aug 2024 18:12:33 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QOVdmOce; spf=pass (imf08.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723486318; a=rsa-sha256; cv=none; b=gt+xSlx9XV+2d4dCnChhJZaxw3cJBD2PGqYpcIZaN4O1lT01x6S3ItSC5+vWK8cqGbZ/2a 3Zu9AdWJ7iDf3eT9FQwUgZ6P22wtfz0Igi5rBoRRfFsc7aVGTxlZbjANY+iJHIUC4GtTGc XFb2uisdnTncm6AZCXkPXAsWmTc0I94= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QOVdmOce; spf=pass (imf08.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723486318; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9Kq72BfB1Q9PD26Udwsuz2Gt7rCvKvwunl3vkpU7op8=; b=TrHOLuhMuRpGwaIiWeZEkDrb2UG/rciJ3bz4Y0aQnvw36ZsnlWyWgfIxfGE28lBCj/ACKv EcmepIAMgNBZK/SyNibOTXFfteYdGBDx5HSJhXZ6vBXs7gDZnn4127QbXDh67slmsc0rCG 48XOwRgzmu4Ylb2eLRxa+X7PYRTiycM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723486353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Kq72BfB1Q9PD26Udwsuz2Gt7rCvKvwunl3vkpU7op8=; b=QOVdmOce2ZaDIdP/Ry9Xt6G9PauDrffoP6DVk56imp6RchXFBqE6v0n0VbjggQ4ThUB482 A2lEvxPMn/8u4PPf1qTlLWCbAxMLA/mdV4i9WqMy0c9GLuoPHUo8RRMFBMdosJJgPd4RNN ugKfTugLE4mf2evWkHqvh8pgZnkBTLY= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-147-1P-d02t3OEG4D7S_nzh6ew-1; Mon, 12 Aug 2024 14:12:31 -0400 X-MC-Unique: 1P-d02t3OEG4D7S_nzh6ew-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6b7ad98c1f8so10692226d6.1 for ; Mon, 12 Aug 2024 11:12:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723486351; x=1724091151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Kq72BfB1Q9PD26Udwsuz2Gt7rCvKvwunl3vkpU7op8=; b=AwDp2NJoFZFdzL+P84uaZkw3yNE7GPav7eAhlvcSs4/eS65dQPHZhiA5yXIJ099XZJ /J3NbgEwVk/zZAr+BR3l3BuT1mwV+PgJcCb3XJY14L+4rRIFqz/28RRcRBgMPhNuvSLr zPTtmJOF47y94cp75egMj/uLNQ+rH/DT+JTRytGCRzPp7lHkQHrMiqAzFmbvGpw7bG7J pmwW9+CXBbxl1OtX2OOloXfs4DDWmPq3m5huWS7ZO3tl2dgjbWpoHeRMH3TEmkCcgZlk U1KmRcd5l2L1zpreFAri6KccI7IW/A6Y0SWso26ymoaq78ygOvepDrztw561GNKcvTzX FsMw== X-Forwarded-Encrypted: i=1; AJvYcCU0wlTisz9la1xCszoUqRX6P9nBKA07nXByfA5ia008tGkf4EHn2Ox0Qa/PxkJXScZ95tdibRzg4Q==@kvack.org X-Gm-Message-State: AOJu0YwtPxwEDXqMhpJjIaWvZGZXPGC/D2eBjxsdDxnZjEsLLe4oYO1G u8xx+UDHus4vgNByrf5dvCC7OT1XZspYqJsitenBD1kAmaoFw3DusZXAv3qdefg0Cv8rQJG9aPl q+ror0Zx16/P/euoTz5gwX7S4T3Eckm1loXWIXAC4vOpYgbJX X-Received: by 2002:a05:620a:4005:b0:7a3:49e2:d5 with SMTP id af79cd13be357-7a4e15b7f45mr75248485a.5.1723486351141; Mon, 12 Aug 2024 11:12:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGINV1er94KHea7itgcrlskkFbFJC5xxX91ZMY2mT7mbgIaqz9jLoR0x5JTp0pkA3b+65JpVA== X-Received: by 2002:a05:620a:4005:b0:7a3:49e2:d5 with SMTP id af79cd13be357-7a4e15b7f45mr75245485a.5.1723486350655; Mon, 12 Aug 2024 11:12:30 -0700 (PDT) Received: from x1n.redhat.com (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4c7dee013sm268663985a.84.2024.08.12.11.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 11:12:30 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "Kirill A . Shutemov" , Nicholas Piggin , David Hildenbrand , Matthew Wilcox , Andrew Morton , James Houghton , Huang Ying , "Aneesh Kumar K . V" , peterx@redhat.com, Vlastimil Babka , Rick P Edgecombe , Hugh Dickins , Borislav Petkov , Christophe Leroy , Michael Ellerman , Rik van Riel , Dan Williams , Mel Gorman , x86@kernel.org, Ingo Molnar , linuxppc-dev@lists.ozlabs.org, Dave Hansen , Dave Jiang , Oscar Salvador , Thomas Gleixner Subject: [PATCH v5 1/7] mm/dax: Dump start address in fault handler Date: Mon, 12 Aug 2024 14:12:19 -0400 Message-ID: <20240812181225.1360970-2-peterx@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240812181225.1360970-1-peterx@redhat.com> References: <20240812181225.1360970-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: r946n1qpbd71gyor5gct4tussstgyx43 X-Rspamd-Queue-Id: 96FD6160013 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1723486353-476877 X-HE-Meta: U2FsdGVkX19HQ+kX9vZrk9XIZILXrk0KncLzd6WpUrJO2H9+zcT2tpyEMgaM5ICGOPeFSfdN7spfCHyPQjnfd9F2yNhWkNdmc39/dTl6UpsHUhUQ0ONTtC01I0CInchz6JBxyPRu/bsMVImN9yB8Y6Fzg/dl/dND82RmUm0IIYMROFpIprx+48ShZbEWM75OHWUOYi07OODYv4y0lnKJhu686hNBRcdsed62rq5KrPdddBDxztLG70kqMwXmQKTVf54nDhIY4Eai/YLieJGYkOVstS7JeD3rpnaMKOVqJrDdDNnvt/6yR1MN4b4lmEQEmGWdC+k0H65AqLsXPC5EUleeN89N9aC8i5vYN5nN+gxVucaiwHcE80w+kbP57V1SzDGQ078+hGd5JWAkEeCOWlUxudzS4Xw6+aa2Nuh28gYKfQBGgexpDCVnSjovQZaWJxeSBWHWRYIrQntljzk/6WzidRsR4nUvoIx4eA6ebTvS8WznvUxjSjs7VgvdBWgASJpU1slk5sjvuVbuWpNXOIAAY7SMSagmRaI5YU8YTyBa1AM+PPV5KzjfAP3bGro+NzKX4yEOPHOU5nUe2VOICfJY5lfdT6r6KPF/uow1d72So+2ADgei7749L5xdzGzq3g3+kneVYDpQIuRcbh5dfXiJShb6b7Ugq7hs+lL7DbrtidDld5n8CRr1xdKn/Pwu7j9bxCLWJ90Mw06w7bbnvMBhMdwVb3BoKDngbKGO6qpS03A4vxHAaV4ZaK8nLK7eh7kGSAYWhzyIlTg1djf75gSDNRd91hZ20TaZU0gvgOP0iFtLYLP80/KILLV3P30aJveoqtKjd+ZMLtERAvIlWdcd/QlgaHTGSi3nMb8y7fJ1pH8IRG/avbupowstfPjlk204gvMD9xLvLHuCGPaXllkO2DCamG70OghnOPxWoDr7jFWdM+eEVb2OlJu7a9aTQxxfa0bmu3RvEPp6GuZ prGl5KWc aIKcc/7noja7gfN81u5e2Hw5dRK+J3V0ozDPRayS/GF6nAYl0z/LT5XZhmNyMRZ5mk62/0qOG0XHuAuhC0vRkzVHlU6hEywBguf1qnobaYsgYX49RZB8+uteVnumWEx6V/FtIcDvbETaATmBmp2ZMTL3kgu5j7cnaEK2q/anbkjPNlKOfeupBMUF7b9EDbFjP6I7eGRG62ZFN7JcXqb6OdftQQwHGxyfLb2e+/39iwTCwHdiDekNm9NOLWnyUMKiiLZ+xPLPglbX2pvkch4unZPfdZ5HVH0YHOF8qxA7gct1zJ0qUuAPE51Mt6ewVJ8SHoBA+1O8lkJks//M+Nz8X8mPuNg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. Acked-by: David Hildenbrand Signed-off-by: Peter Xu --- 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 2051e4f73c8a..9c1a729cd77e 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)