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=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 2201EC47253 for ; Fri, 1 May 2020 12:15:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BAD472051A for ; Fri, 1 May 2020 12:15:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="utcz2o21" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAD472051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 12B6D8E0005; Fri, 1 May 2020 08:15:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DC878E0001; Fri, 1 May 2020 08:15:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0D048E0005; Fri, 1 May 2020 08:15:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id D6DF88E0001 for ; Fri, 1 May 2020 08:15:42 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8FFD4180AD80F for ; Fri, 1 May 2020 12:15:42 +0000 (UTC) X-FDA: 76768046124.24.crow49_31cb01825a129 X-HE-Tag: crow49_31cb01825a129 X-Filterd-Recvd-Size: 4902 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Fri, 1 May 2020 12:15:42 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id q7so9016868qkf.3 for ; Fri, 01 May 2020 05:15:41 -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=XN2iMLJZ5/gzk/iQvImHyC/+kuIhUlZWWwDqzqWAo07sLoYA/Q2ApVpjalpsT6LCxm uf3IHkKbkc+ShF/ijhApUylnecEevWV6GxwcEF4kqbY8LO9egF6WpHTjuB4OGaS1PlUI BXIuNWsSdhzBfwpNSy0/AhmV9cKORCK/2gt/dGIvVz1H02/sN4EAWpHS/zysfWUR95Yc Uo0J7bJI6X8WAH9m1m0L3LjfzooTTXCy3jh9VVq46KE5aYXc5vvERQMwoiXBaOa+jrE3 1emJyb4SPki5tbSsGq6VvF18mfc1ZP79BX9lO+h9+xZJYEIWRQBkeKW8FiLsHXGt47Ji qZ0w== X-Gm-Message-State: AGi0PuZoo27H8NfBcmntOIfFCDCtUFOEIY9C/if/cWgzRRRW9F4suu2z 8EG6VQOeok+4XxH9ok4WzTlnVkZxFGguuoDvytI= X-Google-Smtp-Source: APiQypI7vOl45fml4C9ZmaJpdoktGDh1UHo1sm6nSStD7g2v48BHr/d4jvPc2upoguAAq5WHoh0ijy8npq9J2KVj6zI= 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 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: 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.