Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4427485ybz; Mon, 20 Apr 2020 23:53:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLGj5dzvITMw9tAmJPtvR0ZBr8yaEWH2//9PXHkk45ba8yBjyJtC9EQ/+J0of8qv7xvBnF2 X-Received: by 2002:a17:906:6a02:: with SMTP id o2mr19344989ejr.223.1587452033887; Mon, 20 Apr 2020 23:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587452033; cv=none; d=google.com; s=arc-20160816; b=aKvctL7YyjGEgNFvVpmkGCGvlmW8boKCfV0hs4YUVsh/maKOSG5Sqk+3S0bgpkYQ6k EOqITx2CbCR8u+2hVC2ysAkTWRSnFOmdpHjv3l/wOUtTJ7mOQOwBrave3N+Zvp/5k/Up XnEgbWXSRLpPFvX7WkOH6u75aW/gmt2fM5JWYmPM3SPvF3En0RFA+Duq6A5PILolzapK Olg5DPod0PID7wKdGwIY8m5lZzNpmeeTJBq8mNXzhQYE2vPZ38Ixw2L+MFJwuaYxXgxZ 5uZxxwru01xeCsgSpYLnvOWWoMh21xhRXiWNonWwUKj9/nzqsLTkdSi+vJdaRVzHWhWm 0Z0A== 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=5YbLsKCYzHJjqZKHmOzPYxnR4/ybuDNs41jdJOZ0kcU=; b=JvLv7KcdFKF5OjHhojTDWBF7fkxWE4VQNVt39cT2J4dIWWqz/QrU8m3G4x+K7eqfqL w1KqW6Tnt7foIi/N8u3W9o8tyKr6SYDL+n8g8MYfjSNLbtz3BQ3duoeOiVxk/n16hXEa uFUCpBpOKJPwZNRIwXOeFq3XU/ZqMvgn5NJMG/Z/Nrpev5vq1b1gZ8ImEeNnRUXWc/SE BfreIJtNnjyb7tuRtT6cjoYzhFSHTo8Zyt3W7qoipZ1tfcuH6dT7AH9/5OGJcYdCkebM Xg8JLy51ZbzXmUfyyXzadQhRStuX1nz0Mu0yzwsx6EHxoYZqK5asx14t1BUnhXPURTB0 KFNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XHr4v8ub; 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 ce18si1237166edb.493.2020.04.20.23.53.31; Mon, 20 Apr 2020 23:53:53 -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=XHr4v8ub; 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 S1726716AbgDUGt1 (ORCPT + 99 others); Tue, 21 Apr 2020 02:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725989AbgDUGt1 (ORCPT ); Tue, 21 Apr 2020 02:49:27 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F097C061A0F for ; Mon, 20 Apr 2020 23:49:27 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id t8so4093663qvw.5 for ; Mon, 20 Apr 2020 23:49:27 -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=5YbLsKCYzHJjqZKHmOzPYxnR4/ybuDNs41jdJOZ0kcU=; b=XHr4v8ubQCubJxaztTveYKxTL+o7Ta5nt4OaycGIwPfKXXI4ptAonw/22gL6+zw5zd KkE9TY5h8EdhoHD3KrFiL3/mf4C47QbpjtEVOZVeRt1i1EGLvsD3icnFqoq8k69j91GB ymvwYnbcVTe7ynIMbQL8l5p5hxX3P+5sj1PI+XfEzlZGXN2OSqFGeXUg4OOLC8Qg2Vqz c9o8DLefGPXOmjXqCscilG1hQafxMxxTp7zixJagkNfyDCRgTKPxy/qKzR1xI9gMjnx7 LKaMxzyDrP4PMgK4pcUBfs0oYQf9ap9zKwlIec7Y+ZCJcq17fTnjIzSm9n+a9MEFsNbY 1btg== 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=5YbLsKCYzHJjqZKHmOzPYxnR4/ybuDNs41jdJOZ0kcU=; b=YpFfRKmuCqoc/nW9F1X89E3oJOc6KWyrIa4Nwxn5SxfJO0In/aitJQ09l54tNhYygr HA0NLtBZNlz75FafMyEFIATqOmUl2ouZeDTTWcMO1ALxOulcD2hReA7xYFQHrtXIMZ8J 6pCMqktNU8Vf8plhyYt2VwvgjaCJNd8rc2/3Kc7JSUp0M9qIB255t9k59qS5ZIBgXLrs 8LWBM+syiQ/IFzHkquYR3MZ6Wu/QicQ0O6UTd5zfpMustarvSAGuXJnIBzTtMPXdyqME auTEqqxmR0u8W/VJf+JyLGWZF2eaNYhhTWnKN3AnkVwg5tlOGqS4UpDgeoIDD+L5uwPv E0wg== X-Gm-Message-State: AGi0PuZVUe+50muQfwc1TLYX5/o+WVzkAbPMr01yqw1GCFEAz5fsCLD9 ysqiSdmxZgNb8eTnR6hQvEV75WDYle1hIdkzudw= X-Received: by 2002:a05:6214:1248:: with SMTP id q8mr18877300qvv.66.1587451766306; Mon, 20 Apr 2020 23:49:26 -0700 (PDT) MIME-Version: 1.0 References: <1587369582-3882-1-git-send-email-iamjoonsoo.kim@lge.com> <1587369582-3882-3-git-send-email-iamjoonsoo.kim@lge.com> <412ea2bd-1719-c086-b3e7-64eec6e2bdc4@amd.com> In-Reply-To: <412ea2bd-1719-c086-b3e7-64eec6e2bdc4@amd.com> From: Joonsoo Kim Date: Tue, 21 Apr 2020 15:49:15 +0900 Message-ID: Subject: Re: [PATCH 02/10] drm/ttm: separate PageHighMem() and PageHighMemZone() use case To: =?UTF-8?Q?Christian_K=C3=B6nig?= 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 , Huang Rui , Eric Biederman , "Rafael J . Wysocki" , Pavel Machek , 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 4=EC=9B=94 20=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 5:42, C= hristian K=C3=B6nig =EB=8B=98=EC=9D=B4 =EC=9E=91= =EC=84=B1: > > Am 20.04.20 um 09:59 schrieb js1304@gmail.com: > > From: Joonsoo Kim > > > > Until now, PageHighMem() is used for two different cases. One is to che= ck > > if there is a direct mapping for this page or not. The other is to chec= k > > the zone of this page, that is, weather it is the highmem type zone or = not. > > > > Now, we have separate functions, PageHighMem() and PageHighMemZone() fo= r > > each cases. Use appropriate one. > > > > Note that there are some rules to determine the proper macro. > > > > 1. If PageHighMem() is called for checking if the direct mapping exists > > or not, use PageHighMem(). > > 2. If PageHighMem() is used to predict the previous gfp_flags for > > this page, use PageHighMemZone(). The zone of the page is related to > > the gfp_flags. > > 3. If purpose of calling PageHighMem() is to count highmem page and > > to interact with the system by using this count, use PageHighMemZone(). > > This counter is usually used to calculate the available memory for an > > kernel allocation and pages on the highmem zone cannot be available > > for an kernel allocation. > > 4. Otherwise, use PageHighMemZone(). It's safe since it's implementatio= n > > is just copy of the previous PageHighMem() implementation and won't > > be changed. > > > > I apply the rule #4 for this patch. > > > > Signed-off-by: Joonsoo Kim > > Reviewed-by: Christian K=C3=B6nig for the TTM > changes, but I can't judge if the general approach makes sense or not. Thanks for review! General approach needs to get an agreement from more developers. Thanks.