From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (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 2D59E3B9DAC for ; Wed, 17 Jun 2026 07:25:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781681114; cv=none; b=DAilUVIOKwc/lKR7NEZMiavGLpHMJ99zwlVlBuhQ3MFoQMuQQoTbZn61qQQojwKfeYxklQvN4/YE4UbReAMTIf6pp1fOsF2tbH/DOPN9W08rryoJ+pB6fwc40pZITnnl/YG0u0t/38y5gKrzWnRYUYrzithVss6+olWjA5DIkH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781681114; c=relaxed/simple; bh=bUjWuOAX8Chs+Uzhwhk7q7MOHfYudgwfDL3pzOAfi+U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HO6aUdqfVpheGa0IgO47/LBGdYT/lNF1IuMbdgaTW20BGzf1M6EniBkG7tuj6OM/Ao3XkTGH6uObgwU33aBxSS9WqQF3d0nG1NIdUBY8WXI10sz6lYYQjobu6znU12y9a/kIi0zors77sTGowwR+hnbh9gaJzuMJAoibtj0dxYc= 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=Ya/60fs3; arc=none smtp.client-ip=115.124.30.124 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="Ya/60fs3" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1781681103; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=Q/7i2Thvw9IjpoNZ5uIn77d3kPi0iiqiigtM1YHDwMI=; b=Ya/60fs31l0Ibwy4+WH7OKboLp0vmfP6CK3gLz4M6QAeiqtpZ4Ra/2G1HF/kQjfdU+Js94nhNQj9Myl1CTVIPC+ueRWmk9C6aRSDK9Ii1gv9M5feBKChDzRZ4tbidfU5KudvBmklflHaTfx17yM3aW+r7tNY4fceaLTGdOt5QIM= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0X52iByH_1781681102; Received: from 30.120.66.214(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0X52iByH_1781681102 cluster:ay36) by smtp.aliyun-inc.com; Wed, 17 Jun 2026 15:25:02 +0800 Message-ID: <446789d7-af2c-4a0a-8017-21c6ac69077c@linux.alibaba.com> Date: Wed, 17 Jun 2026 15:25:00 +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] erofs: add folio order to trace_erofs_read_folio To: Zhan Xusheng , Gao Xiang Cc: Chao Yu , linux-kernel@vger.kernel.org, Zhan Xusheng References: <20260617071635.2752453-1-zhanxusheng@xiaomi.com> From: Gao Xiang In-Reply-To: <20260617071635.2752453-1-zhanxusheng@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Xusheng, On 2026/6/17 15:16, 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. > > Signed-off-by: Zhan Xusheng > --- > include/trace/events/erofs.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h > index cd0e3fd8c23f..73d3bfd8b673 100644 > --- a/include/trace/events/erofs.h > +++ b/include/trace/events/erofs.h > @@ -90,6 +90,7 @@ TRACE_EVENT(erofs_read_folio, > __field(erofs_nid_t, nid ) > __field(int, dir ) > __field(pgoff_t, index ) > + __field(unsigned int, order ) > __field(int, uptodate) > __field(bool, raw ) > ), > @@ -99,15 +100,17 @@ TRACE_EVENT(erofs_read_folio, > __entry->nid = EROFS_I(inode)->nid; > __entry->dir = S_ISDIR(inode->i_mode); > __entry->index = folio->index; > + __entry->order = folio_order(folio); > __entry->uptodate = folio_test_uptodate(folio); I guess uptodate is unneeded, it should be always !uptodate. > __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, " > + "uptodate = %d raw = %d", Just a nit, can we rearrange the message into one line in this patch? i.e. "dev = (%d,%d), nid = %llu, %s, index = %lu, order = %u, raw = %d", Thanks, Gao Xiang > show_dev_nid(__entry), > show_file_type(__entry->dir), > (unsigned long)__entry->index, > + __entry->order, > __entry->uptodate, > __entry->raw) > );