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=-1.0 required=3.0 tests=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 8AF7FC433DF for ; Wed, 8 Jul 2020 07:48:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5635E20739 for ; Wed, 8 Jul 2020 07:48:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5635E20739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CAA628D002E; Wed, 8 Jul 2020 03:48:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C58198D000D; Wed, 8 Jul 2020 03:48:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6DBA8D002E; Wed, 8 Jul 2020 03:48:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id A27BB8D000D for ; Wed, 8 Jul 2020 03:48:24 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6A5D5180AD815 for ; Wed, 8 Jul 2020 07:48:24 +0000 (UTC) X-FDA: 77014130928.13.ocean26_5b1333e26ebb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 41B1A18140B70 for ; Wed, 8 Jul 2020 07:48:24 +0000 (UTC) X-HE-Tag: ocean26_5b1333e26ebb X-Filterd-Recvd-Size: 4142 Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Wed, 8 Jul 2020 07:48:23 +0000 (UTC) Received: by mail-ej1-f67.google.com with SMTP id lx13so30673276ejb.4 for ; Wed, 08 Jul 2020 00:48:23 -0700 (PDT) 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; bh=zry+YVLnJazpbmt6mpkdVvSYbOfVb62kd++eIeoVHS4=; b=ZFtbr2CPDr17hqK6k/SpG8RpBzH6ocu61kHiaovBclC0EzM9aoOsXPLFPPgyCrwAPV fHVHUhBXPPCCajE/etBbR08T6jsGdFFYCWYfYVdMjslGRLg3nwW1DqepNMF5bkTGvjYG AkprgIoEWfTmeDY4IXjLc9HJ0a7zhGXbMrTk4rTHfVjmjvzqUpFYLzBH0KQSWVkYBc86 b02htaHsaWpDPm0Up/oD7vUyRnwCTZByCcBtUcg7KKRfEkfbp1yKdkXb2ZUJx1uX4p/W OXueovUiWOs5DPCDdCntxpe4e/qIhkkfCLU6A6VFCTECeLjscxidMZUKGrPT0KZqgw6g 7LXw== X-Gm-Message-State: AOAM533uZLlfPdicIP9Y3zZgoE/vyN0issqAi0I4m99JwiCOlcNnjL/Q /VMKzHMt//fDBIc7C/PuzUo= X-Google-Smtp-Source: ABdhPJwYTvNQiCzblN90hUL+sRhmBKLa163qzpvJPNOECJZNnioVpqTsfuMIhgfngcwgomaL2jfSMg== X-Received: by 2002:a17:906:d143:: with SMTP id br3mr48735485ejb.268.1594194502861; Wed, 08 Jul 2020 00:48:22 -0700 (PDT) Received: from localhost (ip-37-188-179-51.eurotel.cz. [37.188.179.51]) by smtp.gmail.com with ESMTPSA id ay27sm27136473edb.81.2020.07.08.00.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 00:48:21 -0700 (PDT) Date: Wed, 8 Jul 2020 09:48:20 +0200 From: Michal Hocko To: Joonsoo Kim 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: <20200708074820.GE7271@dhcp22.suse.cz> 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> <20200708071916.GD16543@js1304-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200708071916.GD16543@js1304-desktop> X-Rspamd-Queue-Id: 41B1A18140B70 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 08-07-20 16:19:17, Joonsoo Kim wrote: > On Tue, Jul 07, 2020 at 01:40:19PM +0200, Michal Hocko wrote: [...] > 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. I would find the following more understandable, feel free to reuse parts that you like: " new_page_nodemask is a migration callback and it tries to use a common gfp flags for the target page allocation whether it is a base page or a THP. The later only adds GFP_TRANSHUGE to the given mask. This results in the allocation being slightly more aggressive than necessary because the resulting gfp mask will contain also __GFP_RECLAIM_KSWAPD. THP allocations usually exclude this flag to reduce over eager background reclaim during a high THP allocation load which has been seen during large mmaps initialization. There is no indication that this is a problem for migration as well but theoretically the same might happen when migrating large mappings to a different node. Make the migration callback consistent with regular THP allocations. " -- Michal Hocko SUSE Labs