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,URIBL_BLOCKED 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 D4EFFC433DF for ; Tue, 7 Jul 2020 11:40:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A57E72073E for ; Tue, 7 Jul 2020 11:40:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A57E72073E 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 4340F8D000C; Tue, 7 Jul 2020 07:40:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E39A8D000B; Tue, 7 Jul 2020 07:40:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F8C68D000C; Tue, 7 Jul 2020 07:40:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id 1DD6A8D000B for ; Tue, 7 Jul 2020 07:40:23 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B42BE8248047 for ; Tue, 7 Jul 2020 11:40:22 +0000 (UTC) X-FDA: 77011086684.29.lock14_47150c726eb4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 8A97F18086E26 for ; Tue, 7 Jul 2020 11:40:22 +0000 (UTC) X-HE-Tag: lock14_47150c726eb4 X-Filterd-Recvd-Size: 4429 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jul 2020 11:40:22 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id f7so41777415wrw.1 for ; Tue, 07 Jul 2020 04:40:22 -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=TYzmEtg/Kj0i964ThN6Qo6tqP9/EQZBPoedHzLNj/F8=; b=WPv1mNAub36arI0gibspZ+pPqsafByb4ttuiWbu11BiIED9OiEn8Ad04kbsEQWkY1O ciZmQJS9r88p/CgQMHwmk4kH5FVgGaDoe0O/bLHChk0+9+2uv0aM6o8mw8VSmeJgqybh gSM+G5Efs5dsU0qbQbmukoEJrPPKxFRbGMevM6MOi4MLiJOpiAdzzCnBab/63eSR25uk sJQjy9SDS4WTla6SF2KCRdZS++Sy4xSI+FinRTSemapNFdvIziNj1PIs7bgqVwD+65UA FyyRLq2MN5xgr78ghftu4zvFQ2i26OyCOZaxxe6yTF72pDYFkG3VQ5Njy4E4PMWyFVhH F/OQ== X-Gm-Message-State: AOAM530BTnuFfEueqX4io018YXfUFa/qg4OIwDDNSXHxTiqjL3ADPZ1n SG5XbM4VluhqEebb0/GpTVU= X-Google-Smtp-Source: ABdhPJyCUpFQXAvN1uQvadCMYh7ObchD7W+fGup6uatezxdeECrMSV3cMOD/yD3txHQVZXAAdSHPgg== X-Received: by 2002:a5d:650e:: with SMTP id x14mr56294076wru.187.1594122021224; Tue, 07 Jul 2020 04:40:21 -0700 (PDT) Received: from localhost (ip-37-188-179-51.eurotel.cz. [37.188.179.51]) by smtp.gmail.com with ESMTPSA id o9sm650992wrs.1.2020.07.07.04.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 04:40:20 -0700 (PDT) Date: Tue, 7 Jul 2020 13:40:19 +0200 From: Michal Hocko To: js1304@gmail.com 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 , Joonsoo Kim Subject: Re: [PATCH v4 05/11] mm/migrate: clear __GFP_RECLAIM for THP allocation for migration Message-ID: <20200707114019.GI5913@dhcp22.suse.cz> References: <1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com> <1594107889-32228-6-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1594107889-32228-6-git-send-email-iamjoonsoo.kim@lge.com> X-Rspamd-Queue-Id: 8A97F18086E26 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 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. -- Michal Hocko SUSE Labs