Re: [PATCH] mm: annotate refault stalls from swap_readpage

From: Minchan Kim
Date: Thu Oct 10 2019 - 18:11:16 EST


On Thu, Oct 10, 2019 at 03:17:47PM -0400, Johannes Weiner wrote:
> On Thu, Oct 10, 2019 at 08:21:34AM -0700, Minchan Kim wrote:
> > From: Minchan Kim <minchan@xxxxxxxxxx>
> >
> > If block device supports rw_page operation, it doesn't submit bio
> > so annotation in submit_bio for refault stall doesn't work.
> > It happens with zram in android, especially swap read path which
> > could consume CPU cycle for decompress. It is also a problem for
> > zswap which uses frontswap.
> >
> > Annotate swap_readpage() to account the synchronous IO overhead
> > to prevent underreport memory pressure.
> >
> > Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> > Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Thanks, Johannes!

>
> Can you please add a comment to the caller? Lifted from submit_bio():

Sure, I added a little about zram.

>
> /*
> * Count submission time as memory stall. When the device is
> * congested, or the submitting cgroup IO-throttled,
> * submission can be a significant part of overall IO time.
> */