lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jun 2014 16:42:47 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Minchan Kim <minchan@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	kvm@...r.kernel.org, linux-mm@...ck.org,
	Gleb Natapov <gleb@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alexander Graf <agraf@...e.de>, kvm-ppc@...r.kernel.org,
	linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	linuxppc-dev@...ts.ozlabs.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 06/10] CMA: generalize CMA reserved area management
 functionality

On Thu, Jun 12, 2014 at 04:13:11PM +0900, Minchan Kim wrote:
> On Thu, Jun 12, 2014 at 12:21:43PM +0900, Joonsoo Kim wrote:
> > Currently, there are two users on CMA functionality, one is the DMA
> > subsystem and the other is the kvm on powerpc. They have their own code
> > to manage CMA reserved area even if they looks really similar.
> > >From my guess, it is caused by some needs on bitmap management. Kvm side
> > wants to maintain bitmap not for 1 page, but for more size. Eventually it
> > use bitmap where one bit represents 64 pages.
> > 
> > When I implement CMA related patches, I should change those two places
> > to apply my change and it seem to be painful to me. I want to change
> > this situation and reduce future code management overhead through
> > this patch.
> > 
> > This change could also help developer who want to use CMA in their
> > new feature development, since they can use CMA easily without
> > copying & pasting this reserved area management code.
> > 
> > In previous patches, we have prepared some features to generalize
> > CMA reserved area management and now it's time to do it. This patch
> > moves core functions to mm/cma.c and change DMA APIs to use
> > these functions.
> > 
> > There is no functional change in DMA APIs.
> > 
> > v2: There is no big change from v1 in mm/cma.c. Mostly renaming.
> > 
> > Acked-by: Michal Nazarewicz <mina86@...a86.com>
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@....com>
> 
> Acutally, I want to remove bool return of cma_release but it's not
> a out of scope in this patchset.
> 
> Acked-by: Minchan Kim <minchan@...nel.org>
> 
> > 
> > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> > index 00e13ce..4eac559 100644
> > --- a/drivers/base/Kconfig
> > +++ b/drivers/base/Kconfig
> > @@ -283,16 +283,6 @@ config CMA_ALIGNMENT
> >  
> >  	  If unsure, leave the default value "8".
> >  
> > -config CMA_AREAS
> > -	int "Maximum count of the CMA device-private areas"
> > -	default 7
> > -	help
> > -	  CMA allows to create CMA areas for particular devices. This parameter
> > -	  sets the maximum number of such device private CMA areas in the
> > -	  system.
> > -
> > -	  If unsure, leave the default value "7".
> > -
> >  endif
> >  
> >  endmenu
> > diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
> > index 9bc9340..f177f73 100644
> > --- a/drivers/base/dma-contiguous.c
> > +++ b/drivers/base/dma-contiguous.c
> > @@ -24,25 +24,10 @@
> >  
> >  #include <linux/memblock.h>
> >  #include <linux/err.h>
> > -#include <linux/mm.h>
> > -#include <linux/mutex.h>
> > -#include <linux/page-isolation.h>
> >  #include <linux/sizes.h>
> > -#include <linux/slab.h>
> > -#include <linux/swap.h>
> > -#include <linux/mm_types.h>
> >  #include <linux/dma-contiguous.h>
> >  #include <linux/log2.h>
> 
> Should we remain log2.h in here?
> 

We should remove it. I will fix it.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ