Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5609526imm; Wed, 12 Sep 2018 08:27:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbtvrZTBUNVNvO5a8tGFIBlKGNmZERjDPi87IVy8dAiwzi4XOZWus8acaUErXarKhMNRqAN X-Received: by 2002:a62:d2c4:: with SMTP id c187-v6mr3027926pfg.8.1536766056772; Wed, 12 Sep 2018 08:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536766056; cv=none; d=google.com; s=arc-20160816; b=0EU6N0ntppNJq4lnml7hGKxtE3iHz2v5T58AS3zU6wuDURS9uUcWeebhhRboTZK8pM q6Q5lvSte1l93S1lLhXOdRIxY6UOlKVds4SexP6nXoqjfqi6aFRXdbjZ9qC2YL7rCesN SgBZQoyfaf+IqjcCUwujA+M9X/r3iQkXSHEJdf+zsfcR+b5wTKuSe2riRdKMpHoWAeUF Pr0C0lWTQl0EcTResu+oD4PCFAPJfLWxKSn4kqSCmQPH9Jk8FM7lhChIDcIBL9QsSrZz XNP54J0cDi5R2AsDU0ri9etQk4oujT1+8D5fBvzC9Ldyt/aOZwBGiQxvKAsT89WnVOPo i9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iuR5R9HfCwu1w4vMasZtQP2sUwmyp2XGiLPhcg0Z/Z8=; b=jwLBcykE1mykgX7D6i/Y5Xp2q4H3pGhDMBntql5SYsdNH2cgFxbnbuQAyIM9NPpZS7 soQytVCTidMXU/QYobTXrmNmt6YAc5o5B27BZBEfYRxBO4+dCLS7Z/7Zu88T1+qROkC+ H3wY4dVLcGur8XxfLAHxs83e1LBH1bM4h74UyU2QghUUyY9v5q8QLVH8oqyS21+8ZBtO 0wBLzE7WkdROcP0rvaHNRQUDdDEUkifzISUBCLiwsXAW0XylcnRe0TzR/n1CmJjVej7A WL7cUG1jrEoJoFCLTUccXkPUx1ieFs/HDr9nZcH+PGsjICRsASrtP9crhiaQs5jL3LPm yLSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22-v6si1611711pgm.258.2018.09.12.08.27.13; Wed, 12 Sep 2018 08:27:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbeILUa4 (ORCPT + 99 others); Wed, 12 Sep 2018 16:30:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:54198 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726640AbeILUa4 (ORCPT ); Wed, 12 Sep 2018 16:30:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 05212AE19; Wed, 12 Sep 2018 15:25:54 +0000 (UTC) Date: Wed, 12 Sep 2018 17:25:53 +0200 From: Michal Hocko To: Andrea Arcangeli Cc: David Rientjes , Andrew Morton , Zi Yan , "Kirill A. Shutemov" , linux-mm@kvack.org, LKML , Stefan Priebe Subject: Re: [PATCH] mm, thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings Message-ID: <20180912152553.GA20287@dhcp22.suse.cz> References: <20180907130550.11885-1-mhocko@kernel.org> <20180911115613.GR10951@dhcp22.suse.cz> <20180912135417.GA15194@redhat.com> <20180912142126.GM10951@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180912142126.GM10951@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 12-09-18 16:21:26, Michal Hocko wrote: > On Wed 12-09-18 09:54:17, Andrea Arcangeli wrote: [...] > > I wasn't particularly happy about your patch because it still swaps > > with certain defrag settings which is still allowing things that > > shouldn't happen without some kind of privileged capability. > > Well, I am not really sure about defrag=always. I would rather care > about the default behavior to plug the regression first. And think about > `always' mode on top. Or is this a no-go from your POV? In other words the following on top diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 56c9aac4dc86..723e8d77c5ef 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -644,7 +644,7 @@ static inline gfp_t alloc_hugepage_direct_gfpmask(struct vm_area_struct *vma, un #endif if (test_bit(TRANSPARENT_HUGEPAGE_DEFRAG_DIRECT_FLAG, &transparent_hugepage_flags)) - return GFP_TRANSHUGE | (vma_madvised ? 0 : __GFP_NORETRY | this_node); + return GFP_TRANSHUGE | (vma_madvised ? 0 : __GFP_NORETRY); if (test_bit(TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_FLAG, &transparent_hugepage_flags)) return GFP_TRANSHUGE_LIGHT | __GFP_KSWAPD_RECLAIM | this_node; if (test_bit(TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_OR_MADV_FLAG, &transparent_hugepage_flags)) -- Michal Hocko SUSE Labs