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

2018-11-20 Thread Nicolin Chen
On Tue, Nov 20, 2018 at 10:20:10AM +0100, Christoph Hellwig wrote: > On Mon, Nov 05, 2018 at 02:40:51PM -0800, Nicolin Chen wrote: > > > > In general, this seems to make sense to me. It does represent a > > > > theoretical > > > > change in behaviour for devices which have their own CMA area

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

2018-11-20 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 02:40:51PM -0800, Nicolin Chen wrote: > > > In general, this seems to make sense to me. It does represent a > > > theoretical > > > change in behaviour for devices which have their own CMA area somewhere > > > other than kernel memory, and only ever make non-atomic

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

2018-11-19 Thread Nicolin Chen
Robin? Christ? On Mon, Nov 05, 2018 at 02:40:50PM -0800, Nicolin Chen wrote: > On Fri, Nov 02, 2018 at 07:35:42AM +0100, Christoph Hellwig wrote: > > On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: > > > On 31/10/2018 20:03, Nicolin Chen wrote: > > >> The addresses within a single

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

2018-11-05 Thread Nicolin Chen
On Fri, Nov 02, 2018 at 07:35:42AM +0100, Christoph Hellwig wrote: > On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: > > On 31/10/2018 20:03, Nicolin Chen wrote: > >> The addresses within a single page are always contiguous, so it's > >> not so necessary to allocate one single page

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

2018-11-02 Thread Christoph Hellwig
On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: > On 31/10/2018 20:03, 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,

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

2018-11-01 Thread Nicolin Chen
On Thu, Nov 01, 2018 at 07:32:39PM +, Robin Murphy wrote: > > On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: > > > On 31/10/2018 20:03, Nicolin Chen wrote: > > > > The addresses within a single page are always contiguous, so it's > > > > not so necessary to allocate one single

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

2018-11-01 Thread Robin Murphy
On 01/11/2018 18:04, Nicolin Chen wrote: Hi Robin, Thanks for the comments. On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: On 31/10/2018 20:03, Nicolin Chen wrote: The addresses within a single page are always contiguous, so it's not so necessary to allocate one single page

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

2018-11-01 Thread Nicolin Chen
Hi Robin, Thanks for the comments. On Thu, Nov 01, 2018 at 02:07:55PM +, Robin Murphy wrote: > On 31/10/2018 20:03, 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

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

2018-11-01 Thread Robin Murphy
On 31/10/2018 20:03, 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 case, where there might be

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

2018-10-31 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