From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755353Ab0LIRQS (ORCPT ); Thu, 9 Dec 2010 12:16:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64854 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754762Ab0LIRQR (ORCPT ); Thu, 9 Dec 2010 12:16:17 -0500 Date: Thu, 9 Dec 2010 18:14:35 +0100 From: Andrea Arcangeli To: Mel Gorman Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Subject: Re: [PATCH 33 of 66] madvise(MADV_HUGEPAGE) Message-ID: <20101209171435.GD19131@random.random> References: <7193ff8e62fcf7885199.1288798088@v2.random> <20101118151935.GW8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101118151935.GW8135@csn.ul.ie> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 18, 2010 at 03:19:35PM +0000, Mel Gorman wrote: > On Wed, Nov 03, 2010 at 04:28:08PM +0100, Andrea Arcangeli wrote: > > @@ -121,6 +122,11 @@ static inline int split_huge_page(struct > > #define wait_split_huge_page(__anon_vma, __pmd) \ > > do { } while (0) > > #define PageTransHuge(page) 0 > > +static inline int hugepage_madvise(unsigned long *vm_flags) > > +{ > > + BUG_ON(0); > > What's BUG_ON(0) in aid of? When CONFIG_TRANSPARENT_HUGEPAGE is disabled, nothing must call that function (madvise must return -EINVAL like older kernels instead). But I guess you meant I should convert the BUG_ON(0) to a BUG() instead? (done) > I should have said it at patch 4 but don't forget that Michael Kerrisk > should be made aware of MADV_HUGEPAGE so it makes it to a manual page > at some point. Ok, I'll forward patch 4. Thanks, Andrea From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id E56EA6B0087 for ; Thu, 9 Dec 2010 12:15:35 -0500 (EST) Date: Thu, 9 Dec 2010 18:14:35 +0100 From: Andrea Arcangeli Subject: Re: [PATCH 33 of 66] madvise(MADV_HUGEPAGE) Message-ID: <20101209171435.GD19131@random.random> References: <7193ff8e62fcf7885199.1288798088@v2.random> <20101118151935.GW8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101118151935.GW8135@csn.ul.ie> Sender: owner-linux-mm@kvack.org To: Mel Gorman Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Thu, Nov 18, 2010 at 03:19:35PM +0000, Mel Gorman wrote: > On Wed, Nov 03, 2010 at 04:28:08PM +0100, Andrea Arcangeli wrote: > > @@ -121,6 +122,11 @@ static inline int split_huge_page(struct > > #define wait_split_huge_page(__anon_vma, __pmd) \ > > do { } while (0) > > #define PageTransHuge(page) 0 > > +static inline int hugepage_madvise(unsigned long *vm_flags) > > +{ > > + BUG_ON(0); > > What's BUG_ON(0) in aid of? When CONFIG_TRANSPARENT_HUGEPAGE is disabled, nothing must call that function (madvise must return -EINVAL like older kernels instead). But I guess you meant I should convert the BUG_ON(0) to a BUG() instead? (done) > I should have said it at patch 4 but don't forget that Michael Kerrisk > should be made aware of MADV_HUGEPAGE so it makes it to a manual page > at some point. Ok, I'll forward patch 4. Thanks, Andrea -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org