Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5774286ybe; Tue, 17 Sep 2019 13:17:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEhMtfBsRIryxtaVaPyp/V9DMypStoQYMNrgVuetBSk5cmtQ90JS1JAU2e1ngEl/cywdmv X-Received: by 2002:a17:907:41e5:: with SMTP id nb5mr6497993ejb.91.1568751474842; Tue, 17 Sep 2019 13:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568751474; cv=none; d=google.com; s=arc-20160816; b=M889owx6cjdbELRB6tGeuMPuCRIcgnJOz4iHl+HT+rUH6QB/f7ph3mRd8m1JOSGQyy ZN4txKOYNbFL0Dj3/BEJF/PEeGLC9Qz+TqJWXnnh5JJUmPUuaf2aPMuBHZskVDHpITCL zRw/VyeoWrJ4NCAfka+3Wo0y1sHJ7VzhxXFt/q4PKsy9yqHV7kQnpb4kRcy7qUw92d75 FxaKDYlEBoB23UUx6b7vYZdtu8AkpVBJwsLEit24bDZqyPTU2d3ALyqj7PCBfd9JpRUk HDRKW8iLcdG5FAS8px5jS7ZWFo7VA1QH90+Q7yWgPwN4p3mS3Rab5QccdOpmn4op+eAj Vp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ICApskehWZ+VHjtM6MdvX/EWpZT2hl1TSrK5Y2YuIuA=; b=ygiBDuZBbHW4bTnjJ89CmtYj6sKCPac5p+G0Ky2S+22W8J8arePrKfDdyFCDx744Tx thg2T1jXlxdL8kmjpN5i/H5gBasVDsSjffnUZlqYjJCpTFccxX8TJhvlP+5Jc9X3wmuV aT31xXE77D4Tox1gpo9Wl1JoXEpeXnqXFZMveJvyjvYQdFk7mfM0yZpLd8h7kE39omz7 pBybim76b+bW+Bh42EkgyC2cpGXmDlOsmMIl7FGDE4GOrVxsQ1e8Ia1xrMolrqg2zbol pwCfb80bCD2BsiPUdYSopMY2+gJIrnRmKKN6NBA7FtfQZEbo6FnXuK1BZYCSTfCAbqAI AoWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=H3lwO7CA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si1855804edm.73.2019.09.17.13.17.31; Tue, 17 Sep 2019 13:17:54 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=H3lwO7CA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbfIQTqd (ORCPT + 99 others); Tue, 17 Sep 2019 15:46:33 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16635 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfIQTqd (ORCPT ); Tue, 17 Sep 2019 15:46:33 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 17 Sep 2019 12:46:36 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 17 Sep 2019 12:46:31 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 17 Sep 2019 12:46:31 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Sep 2019 19:46:31 +0000 Received: from [10.110.48.28] (10.124.1.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Sep 2019 19:46:30 +0000 Subject: Re: [RFC] mm: Proactive compaction To: David Rientjes , Nitin Gupta CC: , , , , , Yu Zhao , Matthew Wilcox , Qian Cai , Andrey Ryabinin , Roman Gushchin , Greg Kroah-Hartman , Kees Cook , Jann Horn , Johannes Weiner , Arun KS , Janne Huttunen , Konstantin Khlebnikov , , References: <20190816214413.15006-1-nigupta@nvidia.com> X-Nvconfidentiality: public From: John Hubbard Message-ID: Date: Tue, 17 Sep 2019 12:46:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1568749596; bh=ICApskehWZ+VHjtM6MdvX/EWpZT2hl1TSrK5Y2YuIuA=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=H3lwO7CAA2MX6AHwC83mYZwlAuWg8YsR3YGYA7ln6wY8fXQooVBFBY+9uLFs4kC16 8j6CFK0qwbsk51qmDxNk4eymo+M+q7WrvbBhYSzmRf7NYCcp8VEGVallaJQgLWDLix J93s0HhFMSkzzqIE/EJunEuSZxxApWJ2Rt6yY0YYXfoVrnYcTLBeaiycJMeWwvYV0t Qq9qPep71ROiwepIVFo0xwXuWnHkwtyovUMswHznXSahDT6Dr4R2Wz3v0KP5nRoHe8 wO3UL/KDMfNTv1VJe8oVcLXcSDQVbTFprTO9gJphAMQkJWLFMSg1r1AeH/wGWAMuys 5HznIP7KZkP0g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/16/19 1:16 PM, David Rientjes wrote: > On Fri, 16 Aug 2019, Nitin Gupta wrote: ... > > We've had good success with periodically compacting memory on a regular > cadence on systems with hugepages enabled. The cadence itself is defined > by the admin but it causes khugepaged[*] to periodically wakeup and invoke > compaction in an attempt to keep zones as defragmented as possible That's an important data point, thanks for reporting it. And given that we have at least one data point validating it, I think we should feel fairly comfortable with this approach. Because the sys admin probably knows when are the best times to steal cpu cycles and recover some huge pages. Unlike the kernel, the sys admin can actually see the future sometimes, because he/she may know what is going to be run. It's still sounding like we can expect excellent results from simply defragmenting from user space, via a chron job and/or before running important tests, rather than trying to have the kernel guess whether it's a performance win to defragment at some particular time. Are you using existing interfaces, or did you need to add something? How exactly are you triggering compaction? thanks, -- John Hubbard NVIDIA