Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp229721ybg; Tue, 9 Jun 2020 22:17:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5fLm4MUCUKHhWcb5voE0HGnzYnFix4N0dPAoKdkxFsDlVMO48uLuNGFXoRUupRgYP13Jg X-Received: by 2002:a17:906:ca0e:: with SMTP id jt14mr1643859ejb.325.1591766277789; Tue, 09 Jun 2020 22:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591766277; cv=none; d=google.com; s=arc-20160816; b=Dp0vERax5KyxinupGd246KbKNoPZpIl95SVrHt6PZpewWUoE+2lvhMcrdu1gdPE5JM CSPgMqeD5o7ZFIPkqI45O4jiSb8CMhZO4CftXejXgRPI4xN/mLCKa6ZLihluqa92Ntu1 xo0loW+dyuO+FWcEPX21K3M16GNkhdkg8NHvUYDzOUkjsOmQLo4XYRsQUC4GZJvh0uZx 0PMcslSm74pTri8UHDXZLpityS2Kjy7AByuDCu/qEgN+AbK1pU6fKpPYrUvum5Gef6k8 DE6825XG+eTtSFSG95h2/S2sL890g9ECcaD3T0e8DhB76wmqqNeFOWRFwg/Qp6qpgjol jALQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=hLUoxt0yiIKouGw7/buAE5rk8hMNj3nZR/xKb2B/ppc=; b=U4LkFlfEs9TgZDyj2TZ/t+wY00uzltgaSUR8X7MnHVllKBjrj37TpGQdKixaS47TJl USlu4TQKiIsUfOSId9h8HkHSEl0+9kuBoY7I791XIfS4lEuKguVlKtLJFC/AfJI7I7F5 cVGKf9+fKFsmmRSiB7AmtzeMHovd6BzX9ZKaiEE9EjVqD/q7qFg9oz056sclkx+IQzDM z9U4pGU8d9FQhQ8+O2mZNIo+CAZT+rE4FcLW/iqM3EdWw/lt9mJacDWCP9oQIwxnxIEQ OA8NA/giVa1ZnLKlpBeZIylkaNjFGqn16aWCUypq1PPprSIG7RFl4GrYwchldM1Li3IO sEWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jTeg4CPQ; 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 h7si12461525edn.14.2020.06.09.22.17.33; Tue, 09 Jun 2020 22:17:57 -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=jTeg4CPQ; 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 S1726045AbgFJFNJ (ORCPT + 99 others); Wed, 10 Jun 2020 01:13:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbgFJFNI (ORCPT ); Wed, 10 Jun 2020 01:13:08 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B53C05BD1E for ; Tue, 9 Jun 2020 22:13:08 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id p15so486670qvr.9 for ; Tue, 09 Jun 2020 22:13:08 -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:content-transfer-encoding; bh=hLUoxt0yiIKouGw7/buAE5rk8hMNj3nZR/xKb2B/ppc=; b=jTeg4CPQ7s4h9Y4F7BOUQVHOAxnY8YXCxjC/UrDVy9eN4he3dh5AFSdg94P/oYYfeP dbJFi3RpFReQOhjJRvudpIken1Rzr11mWy0Hn/9l+SjQHJ3zBZ33sebrkLiwBZTfYAil CzTtAtWwvGi7JAkvTpsjR5RjzUeXkjkwK39HrJH89c/k3Q/ueAbt3dJtC/E+G1iauWEd nZaozL0GeaIOC4RyLqP2HhPMt5UZ3lHVp3SmZd51aei04H02KVo+K/Lu+t9Z11DOmIGv 4k1xEqpoQ54wrkjzleSc9ykpZV88+iwlu567Urs0h7fdZRrGYbXygA6SDIJvqR8Xa02+ 3riA== 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:content-transfer-encoding; bh=hLUoxt0yiIKouGw7/buAE5rk8hMNj3nZR/xKb2B/ppc=; b=O5ZrvJpl+0g4fBBOkcbInd2U0tTEkrHfU1SexFSVuuUwar9gaHfsD2aI9STLBumUhh ucX55wFJe/KFHLTZe5mbVa4qVl73jiJALAG+rB8GbbTP6EY///JT9ErM3LXtVA50mv14 roiuiJoh/zoBp/CO2knhKgSeVPehnjDCd3HAsnDBP5PH4wTEM5HgCzkVZ0g378QsN0rD 4vbOIYNz5w9Ee2qhWouGEK3SZehNpFRSCWOOtr18REQk8msRz5MqA9nfn7bm32/sAu6k J4AxiBfcjdOxHxEdiWjZltHNrEjDLFsZYRLPPg9h/qR/HlNtCHNLdtGrp4KQXqGsuVQH 5paQ== X-Gm-Message-State: AOAM532Y74PL3kDbVO9WR5VI4qqgHuuPmxyXM/AS82GNPnJ4H8zueZ9J D5/7DbUfyNvl69wpnooy2VYqEhVQNip+WZ7+CJMWrQ== X-Received: by 2002:ad4:4368:: with SMTP id u8mr1472220qvt.227.1591765987012; Tue, 09 Jun 2020 22:13:07 -0700 (PDT) MIME-Version: 1.0 References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-8-git-send-email-iamjoonsoo.kim@lge.com> <20200609135431.GI22623@dhcp22.suse.cz> In-Reply-To: <20200609135431.GI22623@dhcp22.suse.cz> From: Joonsoo Kim Date: Wed, 10 Jun 2020 14:12:56 +0900 Message-ID: Subject: Re: [PATCH v2 07/12] mm/hugetlb: do not modify user provided gfp_mask To: Michal Hocko Cc: Andrew Morton , Linux Memory Management List , LKML , kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020=EB=85=84 6=EC=9B=94 9=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 10:54, M= ichal Hocko =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Wed 27-05-20 15:44:58, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > It's not good practice to modify user input. Instead of using it to > > build correct gfp_mask for APIs, this patch introduces another gfp_mask > > field, __gfp_mask, for internal usage. > > Ugh, this is really ugly. It is just hugetlb to add __GFP_THISNODE as a > special case. This is an ugly hack but I do not think we want to work > around it by yet another hack. Moreover it seems that the __GFP_THISNODE > might be not needed anymore as pointed out in a reply to earlier patch. If you mean __GFP_THISNODE handling is ugly, as you pointed out, __GFP_THISNODE handling would be removed in the next version. If you mean introducing __gfp_mask is ugly, I will try to use a local varia= ble to keep modified gfp_mask rather than introducing a field in alloc_control. Thanks.