Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-08 Thread Christian König
Am 08.07.21 um 06:20 schrieb Christoph Hellwig: On Wed, Jul 07, 2021 at 12:35:23PM -0700, John Stultz wrote: So, as Christian mentioned, on the TTM side it's useful, as they are trying to avoid TLB flushes when changing caching attributes. For the dmabuf system heap purposes, the main benefit i

Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-07 Thread John Stultz
On Wed, Jul 7, 2021 at 12:15 AM Christoph Hellwig wrote: > > On Wed, Jul 07, 2021 at 09:10:26AM +0200, Christian K??nig wrote: > > Well, the original code all this is based on already had the comment that > > this really belong into the page allocator. > > > > The key point is traditionally only G

Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-07 Thread John Stultz
On Tue, Jul 6, 2021 at 11:38 PM Christoph Hellwig wrote: > On Wed, Jun 30, 2021 at 01:34:17AM +, John Stultz wrote: > > This adds a shrinker controlled page pool, extracted > > out of the ttm_pool logic, and abstracted out a bit > > so it can be used by other non-ttm drivers. > > Can you expla

Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-07 Thread Christian König
Am 07.07.21 um 09:14 schrieb Christoph Hellwig: On Wed, Jul 07, 2021 at 09:10:26AM +0200, Christian K??nig wrote: Well, the original code all this is based on already had the comment that this really belong into the page allocator. The key point is traditionally only GPUs used uncached and w

Re: page pools, was Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-07 Thread Christian König
Am 07.07.21 um 08:38 schrieb Christoph Hellwig: On Wed, Jun 30, 2021 at 01:34:17AM +, John Stultz wrote: This adds a shrinker controlled page pool, extracted out of the ttm_pool logic, and abstracted out a bit so it can be used by other non-ttm drivers. Can you explain in detail why you nee

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-06 Thread Christian König
Am 06.07.21 um 23:19 schrieb John Stultz: On Tue, Jul 6, 2021 at 2:15 PM Daniel Vetter wrote: On Tue, Jul 6, 2021 at 11:04 PM John Stultz wrote: On Wed, Jun 30, 2021 at 11:52 PM Christian König wrote: Am 01.07.21 um 00:24 schrieb John Stultz: On Wed, Jun 30, 2021 at 2:10 AM Christian König

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-06 Thread John Stultz
On Tue, Jul 6, 2021 at 2:15 PM Daniel Vetter wrote: > > On Tue, Jul 6, 2021 at 11:04 PM John Stultz wrote: > > On Wed, Jun 30, 2021 at 11:52 PM Christian König > > wrote: > > > > > > Am 01.07.21 um 00:24 schrieb John Stultz: > > > > On Wed, Jun 30, 2021 at 2:10 AM Christian König > > > > wrote:

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-06 Thread Daniel Vetter
On Tue, Jul 6, 2021 at 11:04 PM John Stultz wrote: > On Wed, Jun 30, 2021 at 11:52 PM Christian König > wrote: > > > > Am 01.07.21 um 00:24 schrieb John Stultz: > > > On Wed, Jun 30, 2021 at 2:10 AM Christian König > > > wrote: > > >> Am 30.06.21 um 03:34 schrieb John Stultz: > > >>> +static uns

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-07-06 Thread John Stultz
On Wed, Jun 30, 2021 at 11:52 PM Christian König wrote: > > Am 01.07.21 um 00:24 schrieb John Stultz: > > On Wed, Jun 30, 2021 at 2:10 AM Christian König > > wrote: > >> Am 30.06.21 um 03:34 schrieb John Stultz: > >>> +static unsigned long page_pool_size; /* max size of the pool */ > >>> + > >>>

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-06-30 Thread Christian König
Am 01.07.21 um 00:24 schrieb John Stultz: On Wed, Jun 30, 2021 at 2:10 AM Christian König wrote: Am 30.06.21 um 03:34 schrieb John Stultz: +static unsigned long page_pool_size; /* max size of the pool */ + +MODULE_PARM_DESC(page_pool_size, "Number of pages in the drm page pool"); +module_param

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-06-30 Thread John Stultz
On Wed, Jun 30, 2021 at 2:10 AM Christian König wrote: > Am 30.06.21 um 03:34 schrieb John Stultz: > > +static unsigned long page_pool_size; /* max size of the pool */ > > + > > +MODULE_PARM_DESC(page_pool_size, "Number of pages in the drm page pool"); > > +module_param(page_pool_size, ulong, 0644

Re: [PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-06-30 Thread Christian König
Am 30.06.21 um 03:34 schrieb John Stultz: This adds a shrinker controlled page pool, extracted out of the ttm_pool logic, and abstracted out a bit so it can be used by other non-ttm drivers. Cc: Daniel Vetter Cc: Christian Koenig Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laur

[PATCH v9 1/5] drm: Add a sharable drm page-pool implementation

2021-06-29 Thread John Stultz
This adds a shrinker controlled page pool, extracted out of the ttm_pool logic, and abstracted out a bit so it can be used by other non-ttm drivers. Cc: Daniel Vetter Cc: Christian Koenig Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Vals