Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 06:28:49PM -0800, Nicolin Chen wrote: > So we will keep allocating single pages in dev->cma_area if it's > present, in order to address your previous concern? Yes.

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-06 Thread Nicolin Chen
Hi Christoph, On Wed, Feb 06, 2019 at 08:07:26AM +0100, Christoph Hellwig wrote: > On Tue, Feb 05, 2019 at 03:05:30PM -0800, Nicolin Chen wrote: > > > And my other concern is that this skips allocating from the per-device > > > pool, which drivers might rely on. > > > > Actually Robin had the

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-05 Thread Christoph Hellwig
On Tue, Feb 05, 2019 at 03:05:30PM -0800, Nicolin Chen wrote: > > And my other concern is that this skips allocating from the per-device > > pool, which drivers might rely on. > > Actually Robin had the same concern at v1 and suggested that we could > always use DMA_ATTR_FORCE_CONTIGUOUS to

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-05 Thread Nicolin Chen
Hi Christoph On Mon, Feb 04, 2019 at 09:23:07AM +0100, Christoph Hellwig wrote: > On Tue, Jan 15, 2019 at 01:51:40PM -0800, Nicolin Chen wrote: > > The addresses within a single page are always contiguous, so it's > > not so necessary to allocate one single page from CMA area. Since > > the CMA

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-04 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 01:51:40PM -0800, Nicolin Chen wrote: > The addresses within a single page are always contiguous, so it's > not so necessary to allocate one single page from CMA area. Since > the CMA area has a limited predefined size of space, it might run > out of space in some heavy use

[PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-01-15 Thread Nicolin Chen
The addresses within a single page are always contiguous, so it's not so necessary to allocate one single page from CMA area. Since the CMA area has a limited predefined size of space, it might run out of space in some heavy use case, where there might be quite a lot CMA pages being allocated for