Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-27 Thread Christoph Hellwig
> static inline struct iomap_page *to_iomap_page(struct page *page) > { > + VM_BUG_ON_PGFLAGS(PageTail(page), page); > if (page_has_private(page)) > return (struct iomap_page *)page_private(page); > return NULL; Nit: can you add an empty line after the

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-25 Thread Darrick J. Wong
On Wed, Aug 26, 2020 at 03:26:23AM +0100, Matthew Wilcox wrote: > On Tue, Aug 25, 2020 at 02:02:03PM -0700, Darrick J. Wong wrote: > > > /* > > > - * Structure allocated for each page when block size < PAGE_SIZE to track > > > + * Structure allocated for each page when block size < page size to

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-25 Thread Matthew Wilcox
On Tue, Aug 25, 2020 at 02:02:03PM -0700, Darrick J. Wong wrote: > > /* > > - * Structure allocated for each page when block size < PAGE_SIZE to track > > + * Structure allocated for each page when block size < page size to track > > * sub-page uptodate status and I/O completions. > > "for

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-25 Thread Darrick J. Wong
On Mon, Aug 24, 2020 at 03:55:06PM +0100, Matthew Wilcox (Oracle) wrote: > Size the uptodate array dynamically to support larger pages in the > page cache. With a 64kB page, we're only saving 8 bytes per page today, > but with a 2MB maximum page size, we'd have to allocate more than 4kB > per

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-24 Thread Matthew Wilcox
On Tue, Aug 25, 2020 at 09:59:18AM +1000, Dave Chinner wrote: > On Mon, Aug 24, 2020 at 03:55:06PM +0100, Matthew Wilcox (Oracle) wrote: > > static inline struct iomap_page *to_iomap_page(struct page *page) > > { > > + VM_BUG_ON_PGFLAGS(PageTail(page), page); > > if

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-24 Thread Dave Chinner
On Mon, Aug 24, 2020 at 03:55:06PM +0100, Matthew Wilcox (Oracle) wrote: > Size the uptodate array dynamically to support larger pages in the > page cache. With a 64kB page, we're only saving 8 bytes per page today, > but with a 2MB maximum page size, we'd have to allocate more than 4kB > per

[PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-24 Thread Matthew Wilcox (Oracle)
Size the uptodate array dynamically to support larger pages in the page cache. With a 64kB page, we're only saving 8 bytes per page today, but with a 2MB maximum page size, we'd have to allocate more than 4kB per page. Add a few debugging assertions. Signed-off-by: Matthew Wilcox (Oracle) ---