Re: [PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function

2025-07-07 Thread Taotao Chen
在 2025/7/7 22:54, Matthew Wilcox 写道: On Mon, Jul 07, 2025 at 07:00:33AM +, 陈涛涛 Taotao Chen wrote: +++ b/mm/filemap.c I think this should be a static inline function. I don't think it's worth moving out of line. Of course if you have measurements that show differently, you can change my

Re: [PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function

2025-07-07 Thread hanqi
在 2025/7/7 15:00, 陈涛涛 Taotao Chen 写道: From: Taotao Chen Add write_begin_get_folio() to simplify the common folio lookup logic used by filesystem ->write_begin() implementations. This helper wraps __filemap_get_folio() with common flags such as FGP_WRITEBEGIN, conditional FGP_DONTCACHE, and

Re: [PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function

2025-07-07 Thread Matthew Wilcox
On Mon, Jul 07, 2025 at 07:00:33AM +, 陈涛涛 Taotao Chen wrote: > +++ b/mm/filemap.c I think this should be a static inline function. I don't think it's worth moving out of line. Of course if you have measurements that show differently, you can change my mind. > +/** > + * write_begin_get_foli

Re: [PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function

2025-07-07 Thread Matthew Wilcox
On Mon, Jul 07, 2025 at 07:48:34PM +0800, hanqi wrote: > I think it might be worth considering adding an fgf_t parameter to the > write_begin_get_folio() helper, since in some filesystems the fgp_flags > passed to __filemap_get_folio() in write_begin are not limited to just > FGP_WRITEBEGIN. Someth