lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 12/13] MM: use AIO/DIO for reads from SWP_FS_OPS swap-space
Date
On Tue, 16 Nov 2021, Christoph Hellwig wrote:
> On Tue, Nov 16, 2021 at 01:44:04PM +1100, NeilBrown wrote:
> > When pages a read from SWP_FS_OPS swap-space, the reads are submitted as
> > separate reads for each page. This is generally less efficient than
> > larger reads.
> >
> > We can use the block-plugging infrastructure to delay submitting the
> > read request until multiple contigious pages have been collected. This
> > requires using ->direct_IO to submit the read (as ->readpages isn't
> > suitable for swap).
>
> Abusing the block code here seems little ugly. Also this won't
> compile if CONFIG_BLOCK is not set, will it?

There is nothing really block-layer-specific about the plugging
interfaces. I think it would be quite reasonable to move them to lib/
But you are correct that currently without CONFIG_BLOCK the code will
compile but not work.

>
> What is the problem with just batching up manually?

That would require a bigger change to common code, which would only
benefit one user. The plugging mechanism works well for batching
requests to a block device. Why not use it for non-block-devices too?

Thanks,
NeilBrown


>
> > + /* nofs needs as ->direct_IO may take the same mutex it takes for write */
>
> Overly long line.
>
>

\
 
 \ /
  Last update: 2021-11-16 22:47    [W:2.193 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site