Message ID | 20241111043106.864722-1-zangyangyang1@xiaomi.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [f2fs-dev] f2fs: cache more dentry pages | expand |
On 2024/11/11 12:31, zangyangyang1 wrote: > f2fs_find_data_page is used to find dentry pages, > I think we should cache more dentry pages. Hi, Did you suffer any issue w/o this change? Thanks, > > Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com> > --- > fs/f2fs/data.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index 402e00d54c0b..71ca987fe7cd 100644 > --- a/fs/f2fs/data.c > +++ b/fs/f2fs/data.c > @@ -1286,7 +1286,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index, > struct address_space *mapping = inode->i_mapping; > struct page *page; > > - page = find_get_page(mapping, index); > + page = find_get_page_flags(mapping, index, FGP_ACCESSED); > if (page && PageUptodate(page)) > return page; > f2fs_put_page(page, 0); > -- > 2.43.2
> On 2024/11/11 12:31, zangyangyang1 wrote: >> f2fs_find_data_page is used to find dentry pages, >> I think we should cache more dentry pages. > > Hi, > > Did you suffer any issue w/o this change? Hi, No issue encountered, I just think that dentry pages are more important, so we can put them in the active LRU list in memory to avoid being recycled. Thanks, > > Thanks, > >> >> Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com> >> --- >> fs/f2fs/data.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c >> index 402e00d54c0b..71ca987fe7cd 100644 >> --- a/fs/f2fs/data.c >> +++ b/fs/f2fs/data.c >> @@ -1286,7 +1286,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index, >> struct address_space *mapping = inode->i_mapping; >> struct page *page; >> >> - page = find_get_page(mapping, index); >> + page = find_get_page_flags(mapping, index, FGP_ACCESSED); >> if (page && PageUptodate(page)) >> return page; >> f2fs_put_page(page, 0); >> -- >> 2.43.2 #/******±¾Óʼþ¼°Æ丽¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈκÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØй¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 402e00d54c0b..71ca987fe7cd 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1286,7 +1286,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index, struct address_space *mapping = inode->i_mapping; struct page *page; - page = find_get_page(mapping, index); + page = find_get_page_flags(mapping, index, FGP_ACCESSED); if (page && PageUptodate(page)) return page; f2fs_put_page(page, 0);
f2fs_find_data_page is used to find dentry pages, I think we should cache more dentry pages. Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com> --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.43.2 #/******±¾Óʼþ¼°Æ丽¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈκÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØй¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#