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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 46829C433E0 for ; Thu, 28 May 2020 09:15:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB2FC20B80 for ; Thu, 28 May 2020 09:15:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB2FC20B80 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=applied-asynchrony.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 83798800B7; Thu, 28 May 2020 05:15:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E75A80010; Thu, 28 May 2020 05:15:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 724B4800B7; Thu, 28 May 2020 05:15:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 5C02380010 for ; Thu, 28 May 2020 05:15:18 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 243C0824556B for ; Thu, 28 May 2020 09:15:18 +0000 (UTC) X-FDA: 76865569116.10.metal59_2d864183b3d3d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 36AE516A4C1 for ; Thu, 28 May 2020 09:15:13 +0000 (UTC) X-HE-Tag: metal59_2d864183b3d3d X-Filterd-Recvd-Size: 2976 Received: from mail.itouring.de (mail.itouring.de [188.40.134.68]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 May 2020 09:15:12 +0000 (UTC) Received: from tux.applied-asynchrony.com (p5b07e2b3.dip0.t-ipconnect.de [91.7.226.179]) by mail.itouring.de (Postfix) with ESMTPSA id E0EF54160EC1; Thu, 28 May 2020 11:15:10 +0200 (CEST) Received: from [192.168.100.223] (ragnarok.applied-asynchrony.com [192.168.100.223]) by tux.applied-asynchrony.com (Postfix) with ESMTP id 4B903F01600; Thu, 28 May 2020 11:15:10 +0200 (CEST) Subject: Re: [PATCH v5] mm: Proactive compaction To: Nitin Gupta , Mel Gorman , Michal Hocko , Vlastimil Babka Cc: Matthew Wilcox , Andrew Morton , Mike Kravetz , Joonsoo Kim , David Rientjes , Nitin Gupta , linux-kernel , linux-mm , Linux API References: <20200518181446.25759-1-nigupta@nvidia.com> From: =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= Organization: Applied Asynchrony, Inc. Message-ID: <27b39956-2a21-8eef-8ebb-cb3a93a41a36@applied-asynchrony.com> Date: Thu, 28 May 2020 11:15:10 +0200 MIME-Version: 1.0 In-Reply-To: <20200518181446.25759-1-nigupta@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Rspamd-Queue-Id: 36AE516A4C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: On 5/18/20 8:14 PM, Nitin Gupta wrote: [patch v5 :)] I've been successfully using this in my tree and it works great, but a fr= iend who also uses my tree just found a bug (actually an improvement ;) due to= the change from HUGETLB_PAGE_ORDER to HPAGE_PMD_ORDER in v5. When building with CONFIG_TRANSPARENT_HUGEPAGE=3Dn (for some reason it wa= s off) HPAGE_PMD_SHIFT expands to BUILD_BUG() and compilation fails like this: ... ./include/linux/huge_mm.h:284:28: note: in expansion of macro =E2=80=98BU= ILD_BUG=E2=80=99 284 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) | ^~~~~~~~~ ./include/linux/huge_mm.h:78:26: note: in expansion of macro =E2=80=98HPA= GE_PMD_SHIFT=E2=80=99 78 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT) | ^~~~~~~~~~~~~~~ mm/compaction.c:1874:28: note: in expansion of macro =E2=80=98HPAGE_PMD_O= RDER=E2=80=99 1874 | extfrag_for_order(zone, HPAGE_PMD_ORDER); | ^~~~~~~~~~~~~~~ ... It would be great if the whole thing would compile without THP; the only occurrence is in fragmentation_score_zone(). Unfortunately I'm not famili= ar enough with how to properly check for THP and properly calculate whatever you're doing there, otherwise I would ifdef this away myself. ;) Thanks for an otherwise great patch! cheers, Holger