Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-03 Thread David Hildenbrand
On 03.12.20 12:47, Michal Hocko wrote: > On Thu 03-12-20 10:47:02, David Hildenbrand wrote: >> On 03.12.20 09:28, Michal Hocko wrote: > [...] >>> I think we should aim at easy and very highlevel behavior: >>> - GFP_NOWAIT - unsupported currently IIRC but something that something >>> that should b

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-03 Thread Michal Hocko
On Thu 03-12-20 10:47:02, David Hildenbrand wrote: > On 03.12.20 09:28, Michal Hocko wrote: [...] > > I think we should aim at easy and very highlevel behavior: > > - GFP_NOWAIT - unsupported currently IIRC but something that something > > that should be possible to implement. Isolation is non bl

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-03 Thread David Hildenbrand
On 03.12.20 09:28, Michal Hocko wrote: > On Wed 02-12-20 21:22:36, David Hildenbrand wrote: >> On 02.12.20 20:26, Minchan Kim wrote: >>> On Wed, Dec 02, 2020 at 07:51:07PM +0100, Michal Hocko wrote: > [...] I am still not sure a specific flag is a good interface. Really can this be gfp_ma

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-03 Thread Michal Hocko
On Wed 02-12-20 21:22:36, David Hildenbrand wrote: > On 02.12.20 20:26, Minchan Kim wrote: > > On Wed, Dec 02, 2020 at 07:51:07PM +0100, Michal Hocko wrote: [...] > >> I am still not sure a specific flag is a good interface. Really can this > >> be gfp_mask instead? > > > > I am not strong(even, I

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Minchan Kim
On Wed, Dec 02, 2020 at 09:22:36PM +0100, David Hildenbrand wrote: > On 02.12.20 20:26, Minchan Kim wrote: > > On Wed, Dec 02, 2020 at 07:51:07PM +0100, Michal Hocko wrote: > >> On Wed 02-12-20 09:54:29, Minchan Kim wrote: > >>> On Wed, Dec 02, 2020 at 05:48:34PM +0100, Michal Hocko wrote: > O

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread David Hildenbrand
On 02.12.20 20:26, Minchan Kim wrote: > On Wed, Dec 02, 2020 at 07:51:07PM +0100, Michal Hocko wrote: >> On Wed 02-12-20 09:54:29, Minchan Kim wrote: >>> On Wed, Dec 02, 2020 at 05:48:34PM +0100, Michal Hocko wrote: On Wed 02-12-20 08:15:49, Minchan Kim wrote: > On Wed, Dec 02, 2020 at 04:

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Minchan Kim
On Wed, Dec 02, 2020 at 07:51:07PM +0100, Michal Hocko wrote: > On Wed 02-12-20 09:54:29, Minchan Kim wrote: > > On Wed, Dec 02, 2020 at 05:48:34PM +0100, Michal Hocko wrote: > > > On Wed 02-12-20 08:15:49, Minchan Kim wrote: > > > > On Wed, Dec 02, 2020 at 04:49:15PM +0100, Michal Hocko wrote: > >

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Michal Hocko
On Wed 02-12-20 09:54:29, Minchan Kim wrote: > On Wed, Dec 02, 2020 at 05:48:34PM +0100, Michal Hocko wrote: > > On Wed 02-12-20 08:15:49, Minchan Kim wrote: > > > On Wed, Dec 02, 2020 at 04:49:15PM +0100, Michal Hocko wrote: > > [...] > > > > Well, what I can see is that this new interface is an a

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Minchan Kim
On Wed, Dec 02, 2020 at 05:48:34PM +0100, Michal Hocko wrote: > On Wed 02-12-20 08:15:49, Minchan Kim wrote: > > On Wed, Dec 02, 2020 at 04:49:15PM +0100, Michal Hocko wrote: > [...] > > > Well, what I can see is that this new interface is an antipatern to our > > > allocation routines. We tend to

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Michal Hocko
On Wed 02-12-20 08:15:49, Minchan Kim wrote: > On Wed, Dec 02, 2020 at 04:49:15PM +0100, Michal Hocko wrote: [...] > > Well, what I can see is that this new interface is an antipatern to our > > allocation routines. We tend to control allocations by gfp mask yet you > > are introducing a bool param

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Minchan Kim
On Wed, Dec 02, 2020 at 04:49:15PM +0100, Michal Hocko wrote: > On Wed 02-12-20 10:14:41, David Hildenbrand wrote: > > On 01.12.20 18:51, Minchan Kim wrote: > > > There is a need for special HW to require bulk allocation of > > > high-order pages. For example, 4800 * order-4 pages, which > > > woul

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread David Hildenbrand
On 02.12.20 16:49, Michal Hocko wrote: > On Wed 02-12-20 10:14:41, David Hildenbrand wrote: >> On 01.12.20 18:51, Minchan Kim wrote: >>> There is a need for special HW to require bulk allocation of >>> high-order pages. For example, 4800 * order-4 pages, which >>> would be minimum, sometimes, it re

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Minchan Kim
On Wed, Dec 02, 2020 at 10:14:41AM +0100, David Hildenbrand wrote: > On 01.12.20 18:51, Minchan Kim wrote: > > There is a need for special HW to require bulk allocation of > > high-order pages. For example, 4800 * order-4 pages, which > > would be minimum, sometimes, it requires more. > > > > To m

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread Michal Hocko
On Wed 02-12-20 10:14:41, David Hildenbrand wrote: > On 01.12.20 18:51, Minchan Kim wrote: > > There is a need for special HW to require bulk allocation of > > high-order pages. For example, 4800 * order-4 pages, which > > would be minimum, sometimes, it requires more. > > > > To meet the requirem

Re: [PATCH v2 2/4] mm: introduce cma_alloc_bulk API

2020-12-02 Thread David Hildenbrand
On 01.12.20 18:51, Minchan Kim wrote: > There is a need for special HW to require bulk allocation of > high-order pages. For example, 4800 * order-4 pages, which > would be minimum, sometimes, it requires more. > > To meet the requirement, a option reserves 300M CMA area and > requests the whole 3