From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753378Ab1AQOfW (ORCPT ); Mon, 17 Jan 2011 09:35:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6515 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751657Ab1AQOfV (ORCPT ); Mon, 17 Jan 2011 09:35:21 -0500 Date: Mon, 17 Jan 2011 15:33:45 +0100 From: Andrea Arcangeli To: Michal Simek 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 , Mel Gorman , 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 13 of 66] export maybe_mkwrite Message-ID: <20110117143345.GQ9506@random.random> References: <15324c9c30081da3a740.1288798068@v2.random> <4D344EAF.1080401@petalogix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D344EAF.1080401@petalogix.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On Mon, Jan 17, 2011 at 03:14:07PM +0100, Michal Simek wrote: > Andrea Arcangeli wrote: > > From: Andrea Arcangeli > > > > huge_memory.c needs it too when it fallbacks in copying hugepages into regular > > fragmented pages if hugepage allocation fails during COW. > > > > Signed-off-by: Andrea Arcangeli > > Acked-by: Rik van Riel > > Acked-by: Mel Gorman > > It wasn't good idea to do it. mm/memory.c is used only for system with > MMU. System without MMU are broken. > > Not sure what the right fix is but anyway I think use one ifdef make > sense (git patch in attachment). Can you show the build failure with CONFIG_MMU=n so I can understand better? Other places in mm.h depends on pte_t/vm_area_struct/VM_WRITE to be defined, if a system is without MMU nobody should call it simply. Not saying your patch is wrong, but I'm trying to understand how exactly it got broken and the gcc error would show it immediately. This is only called by memory.o and huge_memory.o and they both are built only if MMU=y. Thanks! Andrea