Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7945982imu; Mon, 3 Dec 2018 23:39:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/U46oudup1sXbql6ody1fvngz/sAvQHTh+NBSDjxDA1WCJ7TT0CTUcL+Rs8w78TCtPR5QYp X-Received: by 2002:a63:9712:: with SMTP id n18mr15751516pge.295.1543909183355; Mon, 03 Dec 2018 23:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543909183; cv=none; d=google.com; s=arc-20160816; b=SHf64GFs+Y4o6L4P4nBTtsdyWnRtPMK3Wec8U7ZyJNL4mJWBFlqqNc1crsEYKSG4JC 8pZPLRfsn+/fph0K2Zqh/ZXmiRDYMlpWxrgoldLvDVlu6dR/R9TuFg4hLazmFrc57KTf 55CkuAp7klWAM0hSqbq0L4BhgdX/a5+OmcCX0keCaRScKT9uonW8AVDfvcz3uBdOeRaN hKXOg51Wqri0I0lMbKuos0G4SBec8Vpu3lqHelRzrXyR4yQ3iUzHycTZU99b16uCpXOf lGIuTowiiZlV9CoisNdPNbGDX0XcTWoTzLK9f338c/OW3ZpqQ4K7I28ZRIZpC1D4y8Qi d+HA== 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=buen6pp89TybZGQv0SdWD565dad7tGx3WuYwx8yzwU8=; b=MMCXEJfe5ojUkB6kPwGFgNxopJ9AonMguvWYYBvdP2iiiu4WPgmq/H6vt1rXtnA4NR hdWute/aOTEXRYb5Oem6PzNm2vfM+I1dJlfHXz+WCX4ezfQ6Ok48JjpMZjxVD02B2r3H u0IRrgT5KVOBQpExXug1RZ+6lniMYVv7Km4TLdvIp9bEK5Wu3DBDQ6Ai0h5iFVqbArt3 mDuLWacB7k6/yqyp/EH0WFZhqRQqFM4U8LNtr0Pg7mz/BwEYrROHyOLKaqH40Uxi2oeU sVCOYohSwN2VRXf63hq3RgTx+M4NUDbIgspAOc4uMSz2MvGh5OtPywjbGXCacwz704o7 rWYA== 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 y6si14942316plr.186.2018.12.03.23.39.28; Mon, 03 Dec 2018 23:39:43 -0800 (PST) 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 S1726075AbeLDHiy (ORCPT + 99 others); Tue, 4 Dec 2018 02:38:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:43292 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726011AbeLDHiy (ORCPT ); Tue, 4 Dec 2018 02:38:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3FC42ADDD; Tue, 4 Dec 2018 07:38:51 +0000 (UTC) Date: Tue, 4 Dec 2018 08:38:50 +0100 From: Michal Hocko To: David Rientjes Cc: Linus Torvalds , Andrea Arcangeli , ying.huang@intel.com, s.priebe@profihost.ag, mgorman@techsingularity.net, Linux List Kernel Mailing , alex.williamson@redhat.com, lkp@01.org, kirill@shutemov.name, Andrew Morton , zi.yan@cs.rutgers.edu, Vlastimil Babka Subject: Re: [patch 0/2 for-4.20] mm, thp: fix remote access and allocation regressions Message-ID: <20181204073850.GW31738@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon 03-12-18 15:50:18, David Rientjes wrote: > This fixes a 13.9% of remote memory access regression and 40% remote > memory allocation regression on Haswell when the local node is fragmented > for hugepage sized pages and memory is being faulted with either the thp > defrag setting of "always" or has been madvised with MADV_HUGEPAGE. > > The usecase that initially identified this issue were binaries that mremap > their .text segment to be backed by transparent hugepages on startup. > They do mmap(), madvise(MADV_HUGEPAGE), memcpy(), and mremap(). Do you have something you can share with so that other people can play and try to reproduce? > This requires a full revert and partial revert of commits merged during > the 4.20 rc cycle. The full revert, of ac5b2c18911f ("mm: thp: relax > __GFP_THISNODE for MADV_HUGEPAGE mappings"), was anticipated to fix large > amounts of swap activity on the local zone when faulting hugepages by > falling back to remote memory. This remote allocation causes the access > regression and, if fragmented, the allocation regression. Have you tried to measure any of the workloads Mel and Andrea have pointed out during the previous review discussion? In other words what is the impact on the THP success rate and allocation latencies for other usecases? -- Michal Hocko SUSE Labs