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] [day] [month] [year] [list]
Date:   Mon, 9 Aug 2021 18:11:44 -0700
From:   Yang Shi <shy828301@...il.com>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Hugh Dickins <hughd@...gle.com>,
        Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Linux MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...e.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page()

On Mon, Aug 9, 2021 at 4:43 PM Huang, Ying <ying.huang@...el.com> wrote:
>
> Yang Shi <shy828301@...il.com> writes:
>
> > On Fri, Aug 6, 2021 at 1:37 PM Yang Shi <shy828301@...il.com> wrote:
> >>
> >> On Thu, Aug 5, 2021 at 11:01 PM Hugh Dickins <hughd@...gle.com> wrote:
> >> >
> >> > On Thu, 5 Aug 2021, Yang Shi wrote:
> >> > > On Tue, Aug 3, 2021 at 10:34 PM Hugh Dickins <hughd@...gle.com> wrote:
> >> > > >
> >> > > > I've never seen the swapoff race claimed by Miaohe, and don't expect to;
> >> > > > but he's probably right, given the current code.  I just dislike adding
> >> > > > unnecessary complexity, and siting it in the wrong place (mm/shmem.c).
> >> > > >
> >> > > > Yang, is it possible that 5.1 commit 8fd2e0b505d1 ("mm: swap: check if
> >> > > > swap backing device is congested or not") was actually developed and
> >> > > > measured on 4.1 or earlier, which still had blk_set_queue_congested()?
> >> > >
> >> > > I forgot the exact version, but definitely not 4.1 or earlier. Maybe
> >> > > 4.19 or earlier. I'm not familiar with how block layer detect
> >> > > congestion, if the logic was changed, hence the optimization doesn't
> >> > > stand anymore nowadays, I'm totally fine to remove it.
> >> >
> >> > You drove me back to look more closely.  blk_set_queue_congested()
> >> > vanished from include/linux/blkdev.h in 4.2, but blk_set_congested()
> >> > appeared then in block/blk-core.c to replace it.  blk_set_congested()
> >> > vanished (along with all references to "congested" in blk-core.c) in
> >> > 5.0, then your commit (most probably tested on 4.19) went into 5.1 -
> >> > just after it had become redundant!
> >> >
> >> > Thanks, yes, let's revert that and Miaohe's and Huang's, later on.
> >>
> >> It should be easier to revert Huang Ying's , then Miaohe's, then mine.
> >
> > Hi Ying,
> >
> > I just prepared the reverts since I need to revert yours and Miaohe's
> > in order to revert my problematic commit.
>
> If your original commit will be reverted, then mine and Miaohe's can be
> reverted from the race condition point of view.

Yes, this is exactly what I did.

>
> Although I still think it's better to call get/put_swap_device() in
> shmem_swapin_page(), that can be discussed with another patch.

Any additional change could be based off the reverts.

>
> Best Regards,
> Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ