From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx150.postini.com [74.125.245.150]) by kanga.kvack.org (Postfix) with SMTP id A1E2A6B0031 for ; Mon, 5 Aug 2013 04:37:42 -0400 (EDT) Received: by mail-ob0-f175.google.com with SMTP id xn12so4955545obc.20 for ; Mon, 05 Aug 2013 01:37:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130805073239.GC10146@dhcp22.suse.cz> References: <1375593061-11350-1-git-send-email-manjunath.goudar@linaro.org> <51fe08c6.87ef440a.10fc.1786SMTPIN_ADDED_BROKEN@mx.google.com> <20130805073239.GC10146@dhcp22.suse.cz> Date: Mon, 5 Aug 2013 14:07:41 +0530 Message-ID: Subject: Re: [PATCH] MM: Make Contiguous Memory Allocator depends on MMU From: Manjunath Goudar Content-Type: multipart/alternative; boundary=90e6ba21219bbae0b904e32f3815 Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Wanpeng Li , linux-arm-kernel@lists.infradead.org, patches@linaro.org, arnd@linaro.org, dsaxena@linaro.org, linaro-kernel@lists.linaro.org, IWAMOTO Toshihiro , Hirokazu Takahashi , Dave Hansen , linux-mm@kvack.org, Johannes Weiner , Balbir Singh , KAMEZAWA Hiroyuki , hyojun.im@lge.com, Nataraja KM/LGSIA CSP-4 --90e6ba21219bbae0b904e32f3815 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 5 August 2013 13:02, Michal Hocko wrote: > On Mon 05-08-13 10:10:08, Manjunath Goudar wrote: > > On 4 August 2013 13:24, Wanpeng Li wrote: > > > > > On Sun, Aug 04, 2013 at 10:41:01AM +0530, Manjunath Goudar wrote: > > > >s patch adds a Kconfig dependency on an MMU being available before > > > >CMA can be enabled. Without this patch, CMA can be enabled on an > > > >MMU-less system which can lead to issues. This was discovered during > > > >randconfig testing, in which CMA was enabled w/o MMU being enabled, > > > >leading to the following error: > > > > > > > > CC mm/migrate.o > > > >mm/migrate.c: In function =91remove_migration_pte=92: > > > >mm/migrate.c:134:3: error: implicit declaration of function > > > =91pmd_trans_huge=92 > > > >[-Werror=3Dimplicit-function-declaration] > > > > if (pmd_trans_huge(*pmd)) > > > > ^ > > > >mm/migrate.c:137:3: error: implicit declaration of function > > > =91pte_offset_map=92 > > > >[-Werror=3Dimplicit-function-declaration] > > > > ptep =3D pte_offset_map(pmd, addr); > > > > > > > > > > Similar one. > > > > > > http://marc.info/?l=3Dlinux-mm&m=3D137532486405085&w=3D2 > > > > > > In this patch MIGRATION config is not required MMU, because already CMA > > config depends > > on MMU and HAVE_MEMBLOCK if both are true then only selecting MIGRATION > and > > MEMORY_ISOLATION. > > No, I think it should be config MIGRATION that should depend on MMU > explicitly because that is where the problem exists. It shouldn't rely > on other configs to not select it automatically. > > Yes you are correct. The question is. Does CMA need to depend on MMU as well? Why? > But please comment on the original thread instead. > I went through the mm/Kconfig, I think MMU dependence is not required for CMA. -- > Michal Hocko > SUSE Labs > Thanks Manjunath Goudar --90e6ba21219bbae0b904e32f3815 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

On 5 August 2013 13:02, Michal Hocko <mhoc= ko@suse.cz> wrote:
On Mon 05-08-13 10:10:08, Manjunath= Goudar wrote:
> On 4 August 2013 13:24, Wanpeng Li <liwanp@linux.vnet.ibm.com> wrote:
>
> > On Sun, Aug 04, 2013 at 10:41:01AM +0530, Manjunath Goudar wrote:=
> > >s patch adds a Kconfig dependency on an MMU being available b= efore
> > >CMA can be enabled. =A0Without this patch, CMA can be enabled= on an
> > >MMU-less system which can lead to issues. This was discovered= during
> > >randconfig testing, in which CMA was enabled w/o MMU being en= abled,
> > >leading to the following error:
> > >
> > > CC =A0 =A0 =A0mm/migrate.o
> > >mm/migrate.c: In function =91remove_migration_pte=92:
> > >mm/migrate.c:134:3: error: implicit declaration of function > > =91pmd_trans_huge=92
> > >[-Werror=3Dimplicit-function-declaration]
> > > =A0 if (pmd_trans_huge(*pmd))
> > > =A0 ^
> > >mm/migrate.c:137:3: error: implicit declaration of function > > =91pte_offset_map=92
> > >[-Werror=3Dimplicit-function-declaration]
> > > =A0 ptep =3D pte_offset_map(pmd, addr);
> > >
> >
> > Similar one.
> >
> > http://marc.info/?l=3Dlinux-mm&m=3D137532= 486405085&w=3D2
>
>
> In this patch MIGRATION config is not required MMU, because already CM= A
> config depends
> on MMU and HAVE_MEMBLOCK if both are true then only selecting MIGRATIO= N and
> MEMORY_ISOLATION.

No, I think it should be config MIGRATION that should depend on= MMU
explicitly because that is where the problem exists. It shouldn't rely<= br> on other configs to not select it automatically.

=A0Yes you are correct.=A0

The question is. Does CMA need to depend on MMU as well? Why?
But please comment on the original thread instead.
I went=A0through=A0the mm/Kconfig, I think MMU dependence is no= t required=A0
for CMA.=A0


--
Michal Hocko
SUSE Labs

Thanks
Manjunath Goudar --90e6ba21219bbae0b904e32f3815-- -- 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/ . Don't email: email@kvack.org