From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFA132E22BD for ; Thu, 18 Jun 2026 08:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770330; cv=none; b=N7Xj2OO0D7b6r+h54RN6LeRiuaw0tmNcW3rq3NABXgU5dIGAD/tJ5LIBCcnCblTSjmQ5q2Wv3xTjxu5y2moG8qtTNx4pG4SoytGGrRRr7pSommwhy5yMqsLKgQbns13cOevtl/Oe8VtF+dqn7lLo79HCuiaa3tghXkKVnBGdrTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770330; c=relaxed/simple; bh=3A2hsXKpysZHoiTdap+lLfx8ySoLFVbHFiGgabwvIZ0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dXaKBbp1s7Wl6Be1hQwl5qWHcHIuTf6RSGFq42ybWNHUT0/Fx+8s9EgVobluoZLYRpayEwOhYURBANIqne7QDaTuhIVG/jtZne8me9dlTUVsXtnQ3pqHw5c36K4wHO/IGt8m7KGekOjsbsMfWyXz9x4qX/QhlckUXhuVg4i01b8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=L8yQw9pa; arc=none smtp.client-ip=115.124.30.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="L8yQw9pa" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1781770325; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=bRlkZ7keD0srCGw9lERg/DlCO+IejhvauYgwJImWaFM=; b=L8yQw9palP5pa6kgGCK4IXZyGWLOf6pTrIXmIN4vIKqJij1EC/wqsZs6F6ic+l6DDxl2TnDE8AHNSdAQNF09zgzGs8XPiIl1Im4HXV5CrnMRt9E/elij/PpEdtxxBrl6/u6/PL0tfxev6kBx/1G7yX0aSBJhAaoD52yRc0xMlto= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R411e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0X56DeDJ_1781770324; Received: from 30.120.66.214(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0X56DeDJ_1781770324 cluster:ay36) by smtp.aliyun-inc.com; Thu, 18 Jun 2026 16:12:04 +0800 Message-ID: <6d3abdf7-8395-40fe-8b68-95a3bcbb63d4@linux.alibaba.com> Date: Thu, 18 Jun 2026 16:12:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] erofs: add folio order to trace_erofs_read_folio To: Zhan Xusheng Cc: Chao Yu , linux-kernel@vger.kernel.org, Zhan Xusheng , linux-erofs mailing list References: <446789d7-af2c-4a0a-8017-21c6ac69077c@linux.alibaba.com> <20260617074334.2761632-1-zhanxusheng@xiaomi.com> From: Gao Xiang In-Reply-To: <20260617074334.2761632-1-zhanxusheng@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/6/17 15:43, Zhan Xusheng wrote: > erofs supports large folios for reads, but the actual folio order > instantiated in the page cache may be lower due to allocation > constraints such as memory fragmentation. > > trace_erofs_read_folio already receives the folio being read but > currently records only its index. Add folio_order() to the tracepoint > so that users can observe the realized folio order and verify the > effectiveness of large folio reads. > > Also drop the uptodate field: read_folio() is only called for a > non-uptodate folio, so it is always 0. > > Suggested-by: Gao Xiang > Signed-off-by: Zhan Xusheng Reviewed-by: Gao Xiang But pls also Cc erofs mailing list next time Thanks, Gao Xiang > --- > include/trace/events/erofs.h | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h > index cd0e3fd8c23f..0a178cb10fb1 100644 > --- a/include/trace/events/erofs.h > +++ b/include/trace/events/erofs.h > @@ -90,7 +90,7 @@ TRACE_EVENT(erofs_read_folio, > __field(erofs_nid_t, nid ) > __field(int, dir ) > __field(pgoff_t, index ) > - __field(int, uptodate) > + __field(unsigned int, order ) > __field(bool, raw ) > ), > > @@ -99,16 +99,15 @@ TRACE_EVENT(erofs_read_folio, > __entry->nid = EROFS_I(inode)->nid; > __entry->dir = S_ISDIR(inode->i_mode); > __entry->index = folio->index; > - __entry->uptodate = folio_test_uptodate(folio); > + __entry->order = folio_order(folio); > __entry->raw = raw; > ), > > - TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, uptodate = %d " > - "raw = %d", > + TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, order = %u, raw = %d", > show_dev_nid(__entry), > show_file_type(__entry->dir), > (unsigned long)__entry->index, > - __entry->uptodate, > + __entry->order, > __entry->raw) > ); >