From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6B75C433ED for ; Wed, 7 Apr 2021 16:04:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EB3561279 for ; Wed, 7 Apr 2021 16:04:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EB3561279 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A8D56B006E; Wed, 7 Apr 2021 12:04:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 440E46B0072; Wed, 7 Apr 2021 12:04:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D0BE6B007D; Wed, 7 Apr 2021 12:04:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 0F07C6B006E for ; Wed, 7 Apr 2021 12:04:20 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9D06A180AD83E for ; Wed, 7 Apr 2021 16:04:19 +0000 (UTC) X-FDA: 78006043038.09.A0B99D6 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf16.hostedemail.com (Postfix) with ESMTP id 987BC80192E3 for ; Wed, 7 Apr 2021 16:04:18 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id h10so21495031edt.13 for ; Wed, 07 Apr 2021 09:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=op4TsYb9L+Os+5jr7ylMDYwPLUPBqNqA4fcsqXHq3Wk=; b=Tdvg1oYPZp2K1uARDf9y4/9JB2yOZWQlEArFn0261kIgqnoJEk106RXaJeLgve6Z8y OQGlWOW2kvxoM5CL5DnLgNgh6uhTLiCLcTHA4jsKqHDioifuRoJKmu/Fbhj8SHnCYU+p EpLpcbmV7GFRVk7lPrqsfo2Xz1sqfk2maSU0TxPPmXU4veSxeoyWhkrvsrI3EjkB8oQb P/d6FD3tU9r/2FEffrrH/eRAnGURKGC0BB+7DUQMBnf70NjrKkiJ4G/TUPWvtl3kjB5C Xysyog/G6wth+TWNUUJtbwDPFtBCFfeh70n6cnp0DYD7rhRCWQU1cabICKona1lAF3V1 nQmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=op4TsYb9L+Os+5jr7ylMDYwPLUPBqNqA4fcsqXHq3Wk=; b=QFaRi7zLuhkq4dE79YtNaUuMcYrtGbJEe6fyvHDQiAtFZRCcg7hgaHTLZGirbNqBrF yrvTRmuda50esQwEDJorTDzaw6dgBXOqOGcuIWn3NQU4pPRsNaLIn2Mb5i6V+wqm3Hjr rOldNb0vVvFwgxbA0GzQudGvRNLImRcS22MM/hG20VRMWrVMOAwTvEcLak1Z8md2iLor LVjj+yhM0NI29F9S7lrS4HSINH7NfjVuMSGSp2VU5Uclooz9foPgZcvz++TnZS0FPWc7 /leQES5UnkD89xWkx6k0zVQkIuxCloKQk35VS69NVVGy5Qr1mhk7jA0teRTxRCIafHoo m3pw== X-Gm-Message-State: AOAM532ozkL40Y7XWKUTbJh6+SF10MGhkrzg5VxQHFpvLw1aK64P5KAW tSQDGFcrsllql3Os7imycuElY6U2rk7YrtZiYdc= X-Google-Smtp-Source: ABdhPJxVgmXNHdO6xt+z/gjM2KguypkKOvh8JrzaaUsE4+0yegAJMtShuAFRzf5bEJN5JFjF+hH7tan31pxH7CyzanM= X-Received: by 2002:a05:6402:518d:: with SMTP id q13mr5352557edd.313.1617811457825; Wed, 07 Apr 2021 09:04:17 -0700 (PDT) MIME-Version: 1.0 References: <20210329183312.178266-1-shy828301@gmail.com> <20210330164200.01a4b78f@thinkpad> <20210331134727.47bc1e6d@thinkpad> <20210406140251.2779c400@thinkpad> <20210407083216.GB15768@suse.de> In-Reply-To: <20210407083216.GB15768@suse.de> From: Yang Shi Date: Wed, 7 Apr 2021 09:04:05 -0700 Message-ID: Subject: Re: [RFC PATCH 0/6] mm: thp: use generic THP migration for NUMA hinting fault To: Mel Gorman Cc: Gerald Schaefer , "Kirill A. Shutemov" , Zi Yan , Michal Hocko , Huang Ying , Hugh Dickins , hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, Andrew Morton , Linux MM , linux-s390@vger.kernel.org, Linux Kernel Mailing List , Alexander Gordeev Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 987BC80192E3 X-Stat-Signature: wctjyphbkt6c6dk7t6d8mnigbn8e66yd Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf16; identity=mailfrom; envelope-from=""; helo=mail-ed1-f48.google.com; client-ip=209.85.208.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617811458-660643 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 7, 2021 at 1:32 AM Mel Gorman wrote: > > On Tue, Apr 06, 2021 at 09:42:07AM -0700, Yang Shi wrote: > > On Tue, Apr 6, 2021 at 5:03 AM Gerald Schaefer > > wrote: > > > > > > On Thu, 1 Apr 2021 13:10:49 -0700 > > > Yang Shi wrote: > > > > > > [...] > > > > > > > > > > > > Yes, it could be. The old behavior of migration was to return -ENOMEM > > > > > > if THP migration is not supported then split THP. That behavior was > > > > > > not very friendly to some usecases, for example, memory policy and > > > > > > migration lieu of reclaim (the upcoming). But I don't mean we restore > > > > > > the old behavior. We could split THP if it returns -ENOSYS and the > > > > > > page is THP. > > > > > > > > > > OK, as long as we don't get any broken PMD migration entries established > > > > > for s390, some extra THP splitting would be acceptable I guess. > > > > > > > > There will be no migration PMD installed. The current behavior is a > > > > no-op if THP migration is not supported. > > > > > > Ok, just for completeness, since Mel also replied that the split > > > was not done on other architectures "because the loss from splitting > > > exceeded the gain of improved locality": > > > > > > I did not mean to request extra splitting functionality for s390, > > > simply skipping / ignoring large PMDs would also be fine for s390, > > > no need to add extra complexity. > > > > Thank you. It could make life easier. The current code still converts > > huge PMD to RPOTNONE even though THP migration is not supported. It is > > easy to skip such PMDs hence cycles are saved for pointless NUMA > > hinting page faults. > > > > Will do so in v2 if no objection from Mel as well. > > I did not get a chance to review this in time but if a v2 shows up, > I'll at least run it through a battery of tests to measure the impact > and hopefully find the time to do a proper review. Superficially I'm not > opposed to using generic code for migration because even if it shows up a > problem, it would be better to optimise the generic implementation than > carry two similar implementations. I'm undecided on whether s390 should > split+migrate rather than skip because I do not have a good overview of > "typical workloads on s390 that benefit from NUMA balancing". Thanks, Mel. I don't have an idea about S390 either. I will just skip huge PMDs for S390 for now as Gerald suggested. > > -- > Mel Gorman > SUSE Labs