lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGWkznHY-iZ0ERbJdX-j4S5qOsUAzV0+x67maprz3W+xbq4hTQ@mail.gmail.com>
Date:   Tue, 7 Sep 2021 20:15:30 +0800
From:   Zhaoyang Huang <huangzhaoyang@...il.com>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Minchan Kim <minchan@...nel.org>,
        Zhaoyang Huang <zhaoyang.huang@...soc.com>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] mm : bail out from psi memstall after submit_bio in swap_readpage

On Tue, Sep 7, 2021 at 8:03 PM Vlastimil Babka <vbabka@...e.cz> wrote:
>
> On 9/7/21 13:59, Huangzhaoyang wrote:
> > From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
> >
> > It doesn't make sense to count IO time into psi memstall. Bail out after
> > bio submitted.
>
> Isn't that the point if psi, to observe real stalls, which include IO?
> Anyway, CCing Johannes.
IO stalls could be observed within blk_io_schedule. The time cost of
the data from block device to RAM is counted here. The original
purpose is to deal with the ZRAM alike devices which deal with the bio
locally instead of submitting it to request queue.
>
> > Signed-off-by: Zhaoyang Huang <zhaoyang.huang@...soc.com>
> > ---
> >  mm/page_io.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/page_io.c b/mm/page_io.c
> > index c493ce9..1d131fc 100644
> > --- a/mm/page_io.c
> > +++ b/mm/page_io.c
> > @@ -423,6 +423,7 @@ int swap_readpage(struct page *page, bool synchronous)
> >       count_vm_event(PSWPIN);
> >       bio_get(bio);
> >       qc = submit_bio(bio);
> > +     psi_memstall_leave(&pflags);
> >       while (synchronous) {
> >               set_current_state(TASK_UNINTERRUPTIBLE);
> >               if (!READ_ONCE(bio->bi_private))
> > @@ -433,7 +434,7 @@ int swap_readpage(struct page *page, bool synchronous)
> >       }
> >       __set_current_state(TASK_RUNNING);
> >       bio_put(bio);
> > -
> > +     return ret;
> >  out:
> >       psi_memstall_leave(&pflags);
> >       return ret;
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ