Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp602816ybz; Fri, 1 May 2020 05:17:34 -0700 (PDT) X-Google-Smtp-Source: APiQypIEexKXCfFNdyfM+1QiZFYPg6EPayEj0SAAXJvEP5j9AjNRAtCGvxlRjRO48vVv3FPIrHWo X-Received: by 2002:a50:9b53:: with SMTP id a19mr3354639edj.104.1588335454098; Fri, 01 May 2020 05:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588335454; cv=none; d=google.com; s=arc-20160816; b=Zp4cx7aNbb4K8wJkeGJJLPqD4ZrWQ4hqTnNSiWl/fimxsPuSpqq9A1d1QdUfApPDl1 GJcnRN+M9VKiK31yGo8GMst4hT8l7I2OuJXG4tv0M+xbyRguzgLR8ZsQSTkbzMgtYhpy QGzyabQjdQKuOVq/Yxdz2W0uc9wUAjUdTsTOIpSxn4ZFDRYCDQoouH1Af6+uMkbbJNBB zypPEHZeXeIOjDcFpweR/LU+/t4vNJI9RSXbuOhl4qCcam4P5YuO0kpnOgdUyg4FoQFd XO9F1B88E3FTft7ewURv0RfIKrEnvK898ENHe/ST52Bhb1AE+hIcO1CBX/LtWcSBHqWJ Gz4g== 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=JYFbEmwByK1kSUV6PdffPqvoJKRC0gx+//umDk3k0Ps=; b=SwbbiYytJaAbUKBoB2LuvglMxxTUr+XxDpeGHiCAiYTABk5V7i1A+vDVBee8rm3/7j 4/j/PHZjx9xP2H45Lnc2g2z8+ahy5s1/tcKrcKL1nSe2RepM0SUyAJJAL4ZnSk6LWWbl OysRUxDTrMlDzw8DG7fp0Bsbo46LCk6JOp0kk8YZ6TrjsxkqggPZMt9/2JdATufmy1VN 2/Wov3zWHKL9ZAMsSNYo2PiEsPyr5KO+IffdmHgRLPI/8W/CpTdycPrznuyPEGoFtolA +Sp0Bd5ldbtt32KLMZIu07qKcVBq5qyzt+ZlWaU6tY2Pip9hTpBYSeLjgy7C08ZYmTdG daEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=utcz2o21; 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 t9si1543275ejr.422.2020.05.01.05.17.09; Fri, 01 May 2020 05:17:34 -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=utcz2o21; 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 S1728639AbgEAMPo (ORCPT + 99 others); Fri, 1 May 2020 08:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728485AbgEAMPn (ORCPT ); Fri, 1 May 2020 08:15:43 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ECC4C061A0C for ; Fri, 1 May 2020 05:15:42 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id s9so6292252qkm.6 for ; Fri, 01 May 2020 05:15:42 -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=JYFbEmwByK1kSUV6PdffPqvoJKRC0gx+//umDk3k0Ps=; b=utcz2o21mWc2/XCNDWGllf7E65EoQXkohhOIrnumu60xq74MyeE2Ls/zpvpsN9N9zk la3EUwd2pzYhxPguLTzL52nfPUbVel2QFjaJLbf0A19TxrpDcCuFgYi/a8b435tJhJOF FtSQSRSouOthXdZfo6dqwSZfNJQ7YNM7pgITwsIdQ/4lDlDs94tI8ispGBSPkQSYrxrX CRx/WnMf95EGs69PHOsH3B39FNOkc5KVJtyB4FB75SfoCbyAgNqk2rI+qR9irEhD/XF7 FzZ34oFtmKNnchILZVR22XTpOzyis+0Z5koivDOcTssL2wPhufeu/qYkbEAseLmY9/ml OOCg== 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=JYFbEmwByK1kSUV6PdffPqvoJKRC0gx+//umDk3k0Ps=; b=bUIZvKc497NydSTMsVe2l/XdIKLoxfEEGmFi5DuGKYmQ4mmWWhwpf5qom8SfkqWNtT Ph8tXr2SudRtqfgsjkaEjniszvmpgkj7voDaLQ5Y89zB0h8+ZeJBg8CrDh2CzMMQ9uAi RoMxTC21NHk7ZaBJg4w4FO32NY/JiUfJa7uSFcZs0tGEO9HuKijY6BL7LYS+EvWHqzF0 0flqklerSwahy5oVkt+Tnyb4teVsiQCURLaKnHamObXmq0qDrp5kgjmp8ggp4ca+5N6b 0zYdQOo+evVggqQnl9OihXbgmdnaX4lubIhx+r9O4DRTlniTJZAHVP2FAPqSVOTbpccA /v6Q== X-Gm-Message-State: AGi0PuZUpgIhUfh9yZz+RKiURrMNnB5W0+i5fRNHztcxMNrwfOSJ1EKs Av4usTzpU3ZAd9MRPfJXhL8saC+PvnftQRcBncA= X-Received: by 2002:a05:620a:1232:: with SMTP id v18mr3341347qkj.429.1588335341365; Fri, 01 May 2020 05:15:41 -0700 (PDT) MIME-Version: 1.0 References: <1588130803-20527-1-git-send-email-iamjoonsoo.kim@lge.com> <20200429184711.9d603da097fdea80f574f1f1@linux-foundation.org> <20200501105545.GA29460@infradead.org> In-Reply-To: <20200501105545.GA29460@infradead.org> From: Joonsoo Kim Date: Fri, 1 May 2020 21:15:30 +0900 Message-ID: Subject: Re: [PATCH v2 00/10] change the implementation of the PageHighMem() To: Christoph Hellwig Cc: Andrew Morton , Linux Memory Management List , LKML , Vlastimil Babka , Laura Abbott , "Aneesh Kumar K . V" , Mel Gorman , Michal Hocko , Johannes Weiner , Roman Gushchin , Minchan Kim , Rik van Riel , Christian Koenig , Huang Rui , Eric Biederman , "Rafael J . Wysocki" , Pavel Machek , kernel-team@lge.com, 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 5=EC=9B=94 1=EC=9D=BC (=EA=B8=88) =EC=98=A4=ED=9B=84 7:55, Ch= ristoph Hellwig =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Fri, May 01, 2020 at 07:52:35PM +0900, Joonsoo Kim wrote: > > > - New code will pop up which gets it wrong and nobody will notice for > > > a long time. > > > > Hmm... I think that it's not that hard to decide correct macro. If we r= ename > > PageHighMem() with PageDirectMapped(), they, PageDirectMapped() and > > PageHighMemZone(), are self-explanation macro. There would be no > > confusion to use. > > What confuses me is why we even need PageHighMemZone - mostly code > should not care about particular zones. Maybe just open coding > PageHighMemZone makes more sense - it is a little more cumersome, but > at least it makes it explicit what we check for. I already sent you > an incremental diff for one obvious place, but maybe we need to look > through the remaining ones if we can kill them or open code them in an > obvious way. I think that PageHighMemZone() is long and complicated enough to have a macro. PageHighMemZone(page) =3D is_highmem_idx(zone_idx(page_zone(page)) Instead of open-code, how about changing the style of macro like as page_from_highmem()? What PageHighMemZone() represent is derivated attribute from the page so PageXXX() style may not be appropriate. Thanks.