Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp318431ybt; Wed, 8 Jul 2020 00:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzVGuC3SxkRpnpIv4YKzxDZJsrxiT4zvZolBDGn6xvcLsY5sI+RcDEY9oDcyeRzl6GA2E3 X-Received: by 2002:a17:906:4a17:: with SMTP id w23mr52923005eju.360.1594192818999; Wed, 08 Jul 2020 00:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594192818; cv=none; d=google.com; s=arc-20160816; b=h7vL7/AWUG4vYmkLPZoVVCfJzqYGqaKZCUojHyVEnr/aj7OJnNAjuabs4TDpEZ1GVV qTbtwMy5IdE+C9f7n1/LLiMAaqsC/rHW5r+j5YupO+X/gt66Hknekwg5BDGbmx43Mwdg pxpARbAFQqeaCyv6zJ0KwEDq178fF/8HNOWG9YZLc9H49jqK2VTOEqVtmEykQ0NuS0uX Ki3yQ7QExBQofvayqgvS7S+KVSOxD6t1eQUXIJ+KtE7uvSraCsLqCaTz6PtDio3Jv6Pg 7GpWcKQ8KId5AyUM5tjstWaSVkprUJWtslGqk0KX6O/bAruR48BR7FtHYAabK6jr29bx HgnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aFOVZ8llBA1PgLKUIDneSWIoZA40NU6uhJVcRvUFfcA=; b=HAtO8LefvVub7rvu8SLnIgu/VlFhNV74MZnd9NsnptXvpiWqKjGBcbln0zlPR2Etvw ouKS7MHPGPKoB0Z4Qa0MEUZKgDEfT8w1ZiXlTP1wjzSke8RQCsOoo2d8GB3YyyoRx6vs /XyVmgMPdAmF79PeG3BIoDyapSc0RDidCgyxBmE5JfLqqe/JczrGr6G/MD5dpiPuHm6h mpyXGVnIvfLl6k0Zr5vwTm2ITHTxLhVtmpgCDU56U2E0Vy8VEcBW4Om8WcCVCIov9bad 7X2J8twPsd4MRJ9dXEfzy40z7Tdt83tlSdWDm2iAT+o9WMKiJoPMmDnR049khme5vRVH +wsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=apFA7dSW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s25si6853080edx.197.2020.07.08.00.19.55; Wed, 08 Jul 2020 00:20:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=apFA7dSW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730171AbgGHHTY (ORCPT + 99 others); Wed, 8 Jul 2020 03:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729972AbgGHHTX (ORCPT ); Wed, 8 Jul 2020 03:19:23 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A741DC061755 for ; Wed, 8 Jul 2020 00:19:23 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t15so788893pjq.5 for ; Wed, 08 Jul 2020 00:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aFOVZ8llBA1PgLKUIDneSWIoZA40NU6uhJVcRvUFfcA=; b=apFA7dSWMCjTRVY2tkyx+bUl72ZjDR7vr+ej/cUKcjNFxAuUW/miBWS/ga6KJb7688 DwXh9TneTrra7aPoVZOfdUa5QQ7G9TnN4WHTdYmvPZriVTtAQwojJHFoqYnpMzuuIdi2 6Y8fiKP7CBqNChi7a/ipMT6cmAaoPCKBMUP9unFh+Waygt3Bm0UmNdLdx9GOYlLzgdyj LhQ3WhCkUx11g1yGNO+JlVq8G4zYow8XIR3as/19Gp8DUhWsKhKOXpQmg3wZI763qDmB CgTXC6ePXMrz4rYjg2vZEf3JbUL5Piia9SZmqEsdNYt7Q7g8TQQAO4Ecae4jpl9fu90P fKpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aFOVZ8llBA1PgLKUIDneSWIoZA40NU6uhJVcRvUFfcA=; b=EvkeqeXsUEGUnGkSazYA2/yvEcn6GZX5UmWCrq5JVhE1GQNV0cbPjdL2VHApihrFzc qrRSZnF05TxXxMr4fulZ/AJ2XiOllNaxG7XyuTEXlS3bYXdxZmhm8e8U+11x4/PJbr0e 0BYpaEYTfgLFlVo+dRcSjkJ48gLHo2QhAyyZlcZpmDkRmDVoOjNIpzVLIqb+oG3S1HUC kkdYhtgQunfcITeZRE8PM2ZqSNadr0eeXfMJOk8OKdG0DVVfzCSCx4gll1IL6wEjT9go KxYBYyiq8TLCQ3pRAi6hBs3HsYAwplCqButK/1d8d/IdAF4zux36QFPClMH2acHYbI/Q qysQ== X-Gm-Message-State: AOAM531LbU4kdMoNAmbR/LWcrly6YQWww7zljPBHa49rVtD7FHTI1NP3 W4GINNsE9qjgvTIYC97l0pU= X-Received: by 2002:a17:90a:d507:: with SMTP id t7mr8342219pju.193.1594192763212; Wed, 08 Jul 2020 00:19:23 -0700 (PDT) Received: from js1304-desktop ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id m9sm2667941pgq.61.2020.07.08.00.19.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2020 00:19:22 -0700 (PDT) Date: Wed, 8 Jul 2020 16:19:17 +0900 From: Joonsoo Kim To: Michal Hocko Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi Subject: Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration Message-ID: <20200708071916.GD16543@js1304-desktop> References: <1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com> <1594107889-32228-6-git-send-email-iamjoonsoo.kim@lge.com> <20200707114019.GI5913@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200707114019.GI5913@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 07, 2020 at 01:40:19PM +0200, Michal Hocko wrote: > On Tue 07-07-20 16:44:43, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > In mm/migrate.c, THP allocation for migration is called with the provided > > gfp_mask | GFP_TRANSHUGE. This gfp_mask contains __GFP_RECLAIM and it > > would be conflict with the intention of the GFP_TRANSHUGE. > > > > GFP_TRANSHUGE/GFP_TRANSHUGE_LIGHT is introduced to control the reclaim > > behaviour by well defined manner since overhead of THP allocation is > > quite large and the whole system could suffer from it. So, they deals > > with __GFP_RECLAIM mask deliberately. If gfp_mask contains __GFP_RECLAIM > > and uses gfp_mask | GFP_TRANSHUGE(_LIGHT) for THP allocation, it means > > that it breaks the purpose of the GFP_TRANSHUGE(_LIGHT). > > GFP_TRANSHUGE* is not a carved in stone design. Their primary reason to > exist is to control how hard to try for different allocation > paths/configurations because their latency expectations might be > largerly different. It is mostly the #PF path which aims to be as > lightweight as possible I believe nobody simply considered migration to be > very significant to even care. And I am still not sure it matters but > I would tend to agree that a consistency here is probably a very minor > plus. > > Your changelog is slightly misleading in that regard because it suggests > that this is a real problem while it doesn't present any actual data. > It would be really nice to make the effective change really stand out. > We are only talking about __GFP_RECLAIM_KSWAPD here. So the only > difference is that the migration won't wake up kswapd now. > > All that being said the changelog should be probably more explicit about > the fact that this is solely done for consistency and be honest that the > runtime effect is not really clear. This would help people reading it in > future. Okay. How about following changelog? Thanks. ----------->8-------------------- Subject: [PATCH] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration In migration target allocation functions, THP allocations uses different gfp_mask, especially, in regard to the reclaim gfp_mask. There is no reason to use different reclaim gfp_mask for each cases and it is an obstacle to make a common function in order to clean-up migration target allocation functions. This patch fixes this situation by using common reclaim gfp_mask for THP allocation.