Re: [Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-08-21 Thread Zhu Yanjun
在 2023/7/31 5:42, Matthew Wilcox 写道: On Sun, Jul 30, 2023 at 09:57:06PM +0800, Zhu Yanjun wrote: 在 2023/7/30 19:18, Matthew Wilcox 写道: On Sun, Jul 30, 2023 at 07:01:26PM +0800, Zhu Yanjun wrote: Does the following function have folio version? " int sg_alloc_append_table_from_pages(struct

Re: [Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-07-31 Thread Zhu Yanjun
在 2023/7/30 19:18, Matthew Wilcox 写道: On Sun, Jul 30, 2023 at 07:01:26PM +0800, Zhu Yanjun wrote: Does the following function have folio version? " int sg_alloc_append_table_from_pages(struct sg_append_table *sgt_append, struct page **pages, unsigned int n_pages, unsigned int

Re: [Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-07-31 Thread Zhu Yanjun
在 2023/6/22 0:45, Matthew Wilcox (Oracle) 写道: This wrapper for sg_set_page() lets drivers add folios to a scatterlist more easily. We could, perhaps, do better by using a different page in the folio if offset is larger than UINT_MAX, but let's hope we get a better data structure than this

Re: [Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-07-30 Thread Matthew Wilcox
On Sun, Jul 30, 2023 at 09:57:06PM +0800, Zhu Yanjun wrote: > > 在 2023/7/30 19:18, Matthew Wilcox 写道: > > On Sun, Jul 30, 2023 at 07:01:26PM +0800, Zhu Yanjun wrote: > > > Does the following function have folio version? > > > > > > " > > > int sg_alloc_append_table_from_pages(struct

Re: [Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-07-30 Thread Matthew Wilcox
On Sun, Jul 30, 2023 at 07:01:26PM +0800, Zhu Yanjun wrote: > Does the following function have folio version? > > " > int sg_alloc_append_table_from_pages(struct sg_append_table *sgt_append, > struct page **pages, unsigned int n_pages, unsigned int offset, > unsigned

[Intel-gfx] [PATCH 03/13] scatterlist: Add sg_set_folio()

2023-06-21 Thread Matthew Wilcox (Oracle)
This wrapper for sg_set_page() lets drivers add folios to a scatterlist more easily. We could, perhaps, do better by using a different page in the folio if offset is larger than UINT_MAX, but let's hope we get a better data structure than this before we need to care about such large folios.