Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-07 Thread Kirill A. Shutemov
On Mon, Nov 07, 2016 at 07:01:03AM -0800, Christoph Hellwig wrote: > On Mon, Nov 07, 2016 at 02:13:05PM +0300, Kirill A. Shutemov wrote: > > It looks like a huge limitation to me. > > The DAX PMD fault code can live just fine with it. There's no way out for DAX as we map backing storage directly

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-07 Thread Kirill A. Shutemov
On Wed, Nov 02, 2016 at 07:36:12AM -0700, Christoph Hellwig wrote: > On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > > I'd also note that having PMD-sized pages has some obvious disadvantages as > > well: > > > > 1) I'm not sure buffer head handling code will quite scale to 512 or

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-03 Thread Jan Kara
On Wed 02-11-16 11:32:04, Kirill A. Shutemov wrote: > On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > > On Mon 31-10-16 21:10:35, Kirill A. Shutemov wrote: > > > > If I understand the motivation right, it is mostly about being able to > > > > mmap > > > > PMD-sized chunks to

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-03 Thread Jan Kara
On Wed 02-11-16 07:36:12, Christoph Hellwig wrote: > On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > > I'd also note that having PMD-sized pages has some obvious disadvantages as > > well: > > > > 1) I'm not sure buffer head handling code will quite scale to 512 or even > > 2048

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-02 Thread Christoph Hellwig
On Wed, Nov 02, 2016 at 11:32:04AM +0300, Kirill A. Shutemov wrote: > Yes, buffer_head list doesn't scale. That's the main reason (along with 4) > why syscall-based IO sucks. We spend a lot of time looking for desired > block. > > We need to switch to some other data structure for storing

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-02 Thread Kirill A. Shutemov
On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > On Mon 31-10-16 21:10:35, Kirill A. Shutemov wrote: > > > If I understand the motivation right, it is mostly about being able to > > > mmap > > > PMD-sized chunks to userspace. So my naive idea would be that we could > > > just > > >

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-01 Thread Jan Kara
On Mon 31-10-16 21:10:35, Kirill A. Shutemov wrote: > [ My mail system got broken and original reply didn't get to through. Resent. > ] OK, this answers some of my questions from previous email so disregard that one. > On Thu, Oct 13, 2016 at 11:33:13AM +0200, Jan Kara wrote: > > On Thu

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-10-31 Thread Kirill A. Shutemov
[ My mail system got broken and original reply didn't get to through. Resent. ] On Thu, Oct 13, 2016 at 11:33:13AM +0200, Jan Kara wrote: > On Thu 15-09-16 14:54:57, Kirill A. Shutemov wrote: > > Most of work happans on head page. Only when we need to do copy data to > > userspace we find

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-10-13 Thread Jan Kara
On Thu 15-09-16 14:54:57, Kirill A. Shutemov wrote: > Most of work happans on head page. Only when we need to do copy data to > userspace we find relevant subpage. > > We are still limited by PAGE_SIZE per iteration. Lifting this limitation > would require some more work. Hum, I'm kind of lost.

[PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-09-15 Thread Kirill A. Shutemov
Most of work happans on head page. Only when we need to do copy data to userspace we find relevant subpage. We are still limited by PAGE_SIZE per iteration. Lifting this limitation would require some more work. Signed-off-by: Kirill A. Shutemov --- mm/filemap.c