Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp275354ybm; Thu, 28 May 2020 02:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0lSWrX+kT2uTn2idhMMUBasgiak6GRabvjtiIJVCE3jF1M677TNGNSLAjpWOY/19tBiG0 X-Received: by 2002:a17:906:a88:: with SMTP id y8mr980131ejf.68.1590657905884; Thu, 28 May 2020 02:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590657905; cv=none; d=google.com; s=arc-20160816; b=NdBM82LagpcLdMQLXvb19efEpaAfZl+YpAjM9TiHXc4ZgF7N03bEKrNv6yMeL2BSw1 dzbYhXRfhXpmw2S2SlaTq3kvaz5/vbAStMWdRmMcyzxQgacRzEyTzOTYrsKN5V08+1+T WxmB5C2TEtEqcHUnWEqGiOTZDx3U/ZcNYUGh1zI81MDs2100RCeZ7JuM9HagVcZHb6Zp inPRPC39c0KLXrNdnwhUlC6Hm8oPIE9Gx2DbyoEgHEtxzNIMvnt5kehafc95MpEUIUW+ bDJ24OaLZNYIEm9QtQpDd2GIaoSd+pA9MDGqznz1mQvyUGP178E6ovvByVmf2AFdSb7x 9LmA== 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 :content-language:in-reply-to:mime-version:date:message-id :organization:from:references:cc:to:subject; bh=L3YrZ1S4n8/6y/fAB+NKkB7jKrXv7G6E14cKfp/Aqwk=; b=YHW0LmibFNA9I4Cs8H+gX9lnsM/+AaftO20LA4Edkupp7YkMyTCa4jLM/ZTS/KvVkh G5aWreZBSxGi5ytt89x080YzOUPuE3fKo4w0tleQtaTtWg454xy4KfH9gAtk3YFRt+9d iQf6ufCtdQ0uIXK1gu2HiqTGzFfUnyE2aV6eeSK0LFEA0Jyx+fnbC5T1QS1yvfBDJyHf LI8Sz+ARnMvFQr3UFCv609D1KLD4UHZs6liVKzxip4ZGiFGREgPjIqUw2D9+mzc4ZrdI xK0auvAh5ULMMvt0V/F0jDrrGYrVGgQoV0xVRgkA5jFuyyOiHWOuLsswSxIir5ISIDlh Kz/w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oc24si2498572ejb.541.2020.05.28.02.24.42; Thu, 28 May 2020 02:25:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbgE1JWt (ORCPT + 99 others); Thu, 28 May 2020 05:22:49 -0400 Received: from mail.itouring.de ([188.40.134.68]:57880 "EHLO mail.itouring.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbgE1JWs (ORCPT ); Thu, 28 May 2020 05:22:48 -0400 X-Greylist: delayed 456 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 May 2020 05:22:47 EDT 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 friend 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=n (for some reason it was 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 ‘BUILD_BUG’ 284 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) | ^~~~~~~~~ ./include/linux/huge_mm.h:78:26: note: in expansion of macro ‘HPAGE_PMD_SHIFT’ 78 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT) | ^~~~~~~~~~~~~~~ mm/compaction.c:1874:28: note: in expansion of macro ‘HPAGE_PMD_ORDER’ 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 familiar 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