Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp863580pxf; Wed, 7 Apr 2021 13:35:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylyV3jskDM2enYw8rHtXJsVKLwm25mb1dANuBqLSwOqDAzJgfnR+tUpCdbxqnSRWx/CewF X-Received: by 2002:a17:906:298b:: with SMTP id x11mr5904184eje.43.1617827727825; Wed, 07 Apr 2021 13:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617827727; cv=none; d=google.com; s=arc-20160816; b=w99mwfTfY68zwDnQgsldKayaq6nQsNN+pM9PlWfFLGJEutWeDDsWi+daPZxi2zrMOl c/CW8FTZ/E/q1KxT0OXadX0l/im9XoBGdSYJegw8biabXl3ZDvGDQ+zujwPR8DdQ/bM/ Ixsg2iW4k6SFFX2zDEjM+/wH2J1YZFw8FJaH67hcZQZeqJTFoqM9eexInWhWCZ60f45x UOjLjcD61l67yKOCpLd1QbmAqxrecJG6R1IHk/KFl3MW6tq7KXUUL2iPyGHs4cetNrTe /WmV/0F3egVl8IC6v4D5vUUBYGIK6BSSf7oEZoHC7nYXGjc3Z9mq2BI5elhDUCvNK78H rqYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=T4JWP9/WXEpYU1ImO1hBiEyYt6caDJTi5oq0CAxWZLc=; b=z5VYja2ZDXPOQ+3qJJQg50Cq9cbGRztlB13PvMKCfs6lOAW2efrD18qk37iYnBPdRp +z0vAC92IAAne8twgAl30B74JETVuQoAvsKeVyIrzBSL/zykuEoa3ea2hZw6rTfO85a8 cV68vxVQISe0cJQsX7RuywCFKzm2sDt06DyeUMXcrxXvtomVmr4SOF4UytAvY44CreP3 vwuWpB7SIJElfsm5IwTlrPmm/CgrEQB2QtLwpASdGfNpqiez+y8kt6pTcdcqvNWvoo7t xFV4syaLHB5j5hTq+UP1DKERU1s1/YZAVDckDd7bjVkH5k3ii3cj2bhSVFlW1CDCx4tC 98QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si19832541edc.296.2021.04.07.13.35.04; Wed, 07 Apr 2021 13:35:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244965AbhDGIcn (ORCPT + 99 others); Wed, 7 Apr 2021 04:32:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:53002 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244921AbhDGIci (ORCPT ); Wed, 7 Apr 2021 04:32:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3DD8DAFCF; Wed, 7 Apr 2021 08:32:19 +0000 (UTC) Date: Wed, 7 Apr 2021 09:32:16 +0100 From: Mel Gorman To: Yang Shi 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 Subject: Re: [RFC PATCH 0/6] mm: thp: use generic THP migration for NUMA hinting fault Message-ID: <20210407083216.GB15768@suse.de> References: <20210329183312.178266-1-shy828301@gmail.com> <20210330164200.01a4b78f@thinkpad> <20210331134727.47bc1e6d@thinkpad> <20210406140251.2779c400@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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". -- Mel Gorman SUSE Labs