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: <87wn4acy1a.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date:   Wed, 22 Feb 2023 09:02:41 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Hugh Dickins <hughd@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, Zi Yan <ziy@...dia.com>,
        Yang Shi <shy828301@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Oscar Salvador <osalvador@...e.de>,
        Matthew Wilcox <willy@...radead.org>,
        Bharata B Rao <bharata@....com>,
        Alistair Popple <apopple@...dia.com>,
        Xin Hao <xhao@...ux.alibaba.com>,
        Minchan Kim <minchan@...nel.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        "Xu, Pengfei" <pengfei.xu@...el.com>,
        Christoph Hellwig <hch@....de>,
        Stefan Roesch <shr@...kernel.io>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH -v5 0/9] migrate_pages(): batch TLB flushing

Hugh Dickins <hughd@...gle.com> writes:

> On Tue, 21 Feb 2023, Huang, Ying wrote:
>> 
>> On second thought, I think that it may be better to provide a fix as
>> simple as possible firstly.  Then we can work on a more complex fix as
>> we discussed above.  The simple fix is easy to review now.  And, we will
>> have more time to test and review the complex fix.
>> 
>> In the following fix, I disabled the migration batching except for the
>> MIGRATE_ASYNC mode, or the split folios of a THP folio.  After that, I
>> will work on the complex fix to enable migration batching for all modes.
>> 
>> What do you think about that?
>
> I don't think there's a need to rush in the wrong fix so quickly.
> Your series was in (though sometimes out of) linux-next for some
> while, without causing any widespread problems.  Andrew did send
> it to Linus yesterday, I expect he'll be pushing it out later today
> or tomorrow, but I don't think it's going to cause big problems.
> Aiming for a fix in -rc2 would be good.

Sure, I will target to fix in -rc2.  Thanks for suggestion!

> Why would it be complex?

Now, I think the big picture could be,

if (MIGRATE_ASYNC) {
        migrate_pages_batch(from,);
} else {
        migrate_pages_batch(from,, MIGRATE_ASYNC,);
        list_for_each_entry_safe (folio,, from) {
                migrate_pages_batch(one_folio, , MIGRATE_SYNC,);
        }
}

That is, for synchronous migration, try asynchronous batched migration
firstly, then fall back to synchronous migration one by one.  This will
make the retry logic easier to be understood.

This needs some code change.  Anyway, I will try to do that and show the
code.

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ