Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933709AbbBBWWl (ORCPT ); Mon, 2 Feb 2015 17:22:41 -0500 Received: from mga14.intel.com ([192.55.52.115]:56797 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933480AbbBBWWi (ORCPT ); Mon, 2 Feb 2015 17:22:38 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,508,1418112000"; d="scan'208";a="660543056" Message-ID: <54CFF8AC.6010102@intel.com> Date: Mon, 02 Feb 2015 14:22:36 -0800 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Mel Gorman , linux-mm@kvack.org CC: Minchan Kim , Vlastimil Babka , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints References: <20150202165525.GM2395@suse.de> In-Reply-To: <20150202165525.GM2395@suse.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1187 Lines: 20 On 02/02/2015 08:55 AM, Mel Gorman wrote: > This patch identifies when a thread is frequently calling MADV_DONTNEED > on the same region of memory and starts ignoring the hint. On an 8-core > single-socket machine this was the impact on ebizzy using glibc 2.19. The manpage, at least, claims that we zero-fill after MADV_DONTNEED is called: > MADV_DONTNEED > Do not expect access in the near future. (For the time being, the application is finished with the given range, so the kernel can free resources > associated with it.) Subsequent accesses of pages in this range will succeed, but will result either in reloading of the memory contents from the > underlying mapped file (see mmap(2)) or zero-fill-on-demand pages for mappings without an underlying file. So if we have anything depending on the behavior that it's _always_ zero-filled after an MADV_DONTNEED, this will break it. -- 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/