Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbbBWTnn (ORCPT ); Mon, 23 Feb 2015 14:43:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57958 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752126AbbBWTnm (ORCPT ); Mon, 23 Feb 2015 14:43:42 -0500 Message-ID: <54EB82D0.9080606@redhat.com> Date: Mon, 23 Feb 2015 14:43:12 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andrew Morton CC: Ebru Akagunduz , linux-mm@kvack.org, kirill@shutemov.name, mhocko@suse.cz, mgorman@suse.de, rientjes@google.com, sasha.levin@oracle.com, hughd@google.com, hannes@cmpxchg.org, vbabka@suse.cz, linux-kernel@vger.kernel.org, aarcange@redhat.com, keithr@alum.mit.edu, dvyukov@google.com Subject: Re: [PATCH v2] mm: incorporate zero pages into transparent huge pages References: <1423688635-4306-1-git-send-email-ebru.akagunduz@gmail.com> <20150218153119.0bcd0bf8b4e7d30d99f00a3b@linux-foundation.org> <54E5296C.5040806@redhat.com> <20150223111621.bc73004f51af2ca8e2847944@linux-foundation.org> In-Reply-To: <20150223111621.bc73004f51af2ca8e2847944@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2167 Lines: 61 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/23/2015 02:16 PM, Andrew Morton wrote: > On Wed, 18 Feb 2015 19:08:12 -0500 Rik van Riel > wrote: >>> If so, this might be rather undesirable behaviour in some >>> situations (and ditto the current behaviour for pte_none >>> ptes)? >>> >>> This can be tuned by adjusting khugepaged_max_ptes_none, > Here's a live one: > https://bugzilla.kernel.org/show_bug.cgi?id=93111 > > Application does MADV_DONTNEED to free up a load of memory and > then khugepaged comes along and pages that memory back in again. > It seems a bit silly to do this after userspace has deliberately > discarded those pages! > > Presumably MADV_NOHUGEPAGE can be used to prevent this, but it's a > bit of a hand-grenade. I guess the MADV_DONTNEED manpage should be > updated to explain all this? That makes me wonder what a good value for khugepaged_max_ptes_none would be. Doubling the amount of memory a program uses seems quite unreasonable. Increasing the amount of memory a program uses by 512x seems totally unreasonable. Increasing the amount of memory a program uses by 20% might be reasonable, if that much memory is available, since that seems to be about how much performance improvement we have ever seen from THP. Andrew, Andrea, do you have any ideas on this? Is this something to just set, or should we ask Ebru to run a few different tests with this? - -- All rights reversed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU64LQAAoJEM553pKExN6DbjAH/31KsggMczFT5Z6KQ68dnMnc nlYAHmiC8nBzguhj5fUtm94jWBK1IPg9cUkRt1tKDJXkVGk91it0MdO1QhuSL91b xNghqc1d8/P/dmuguNH6C7BUlf52iFFyaCrnip+sO1rxIEUYkFwHxpwC5vSlLrrl bENlILFuY5kmF2xd6kIfvhOr7TzkbCS92Da3la0sCIT4tjlXPKJ6fuTo9aK8LOqr kKi6gmmyH+gDhi2EAJk3D1cZT8RqrynsbirEEcWq+ORNUScmSqNlQqGOLw/nJeSp Nkw7rReeMz5PHVxnsNQE4kxQ4zIJ0auZsZ9cC4Gw3ZpQKdiLBiAK+lJECgQsqPk= =pDxP -----END PGP SIGNATURE----- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/