2015-07-09 ?? 7:47? Dave Airlie ?(?) ? ?:>>> >>> >>> Can the various in-kernel GPU drivers benefit from this? If so, wiring >>> up one or more of those would be helpful? >> >> >> I'm sure that other in-kernel GPU drivers can have benefit. >> It must be helpful. >> >> If I was familiar with other in-kernel GPU drivers code, I tried to patch >> them. >> It's too bad. > > I'll bring dri-devel into the loop here. > > ARM GPU developers please take a look at this stuff, Laurent, Rob, > Eric I suppose.I sent a patch, https://lkml.org/lkml/2015/3/24/1182, and my opinion about compaction to ARM GPU developers via Korea ARM branch. I got a reply that they had no time to review it. I hope they're interested to this patch.> > Daniel Vetter you might have some opinions as well. > > Dave. >
On Thu, Jul 09, 2015 at 08:55:25AM +0900, Gioh Kim wrote:> > > 2015-07-09 ?? 7:47? Dave Airlie ?(?) ? ?: > >>> > >>> > >>>Can the various in-kernel GPU drivers benefit from this? If so, wiring > >>>up one or more of those would be helpful? > >> > >> > >>I'm sure that other in-kernel GPU drivers can have benefit. > >>It must be helpful. > >> > >>If I was familiar with other in-kernel GPU drivers code, I tried to patch > >>them. > >>It's too bad. > > > >I'll bring dri-devel into the loop here. > > > >ARM GPU developers please take a look at this stuff, Laurent, Rob, > >Eric I suppose. > > I sent a patch, https://lkml.org/lkml/2015/3/24/1182, and my opinion about compaction > to ARM GPU developers via Korea ARM branch. > I got a reply that they had no time to review it. > > I hope they're interested to this patch.i915 gpus would support 64kb and 2mb pages, but we never implemented this. I don't think this would fit for gem based drivers since our backing storage is shmemfs. So if we want to implement page migration (which we'd probably want to make large pages work well) we'd need to pimp shmem to a) hand large pages to us b) forward the migrate calls. Probably that means we need to build our own gemfs reusing shmemfs code. I guess something similar would apply for ttm-based drivers (which use shmemfs just for swap-in/out but otherwise have their own page allocator, at least sometimes). Given all that I'd expect anything implementing migrate to just create a gpufs thing for the backing storage, no need for more hooks. There's also other areas for better code sharing among gpu drivers (e.g. mmu notifiers to get off userspace pages slurped in&pinned with gup or shrinker callbacks to get the gpu off it's memory binge). But that would all be helper libraries in drm, not sure we need anything new from the core vm. Also there's a bit a lack of gpu drivers from the arm world in upstream, which is probabyl why this patch series doesn't come with a user. Might be better to first upstream the driver before talking about additional infrastructure that it needs. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
On Thu, Jul 09, 2015 at 03:08:48PM +0200, Daniel Vetter wrote:> On Thu, Jul 09, 2015 at 08:55:25AM +0900, Gioh Kim wrote: > > > > > > 2015-07-09 ?? 7:47? Dave Airlie ?(?) ? ?: > > >>> > > >>> > > >>>Can the various in-kernel GPU drivers benefit from this? If so, wiring > > >>>up one or more of those would be helpful? > > >> > > >> > > >>I'm sure that other in-kernel GPU drivers can have benefit. > > >>It must be helpful. > > >> > > >>If I was familiar with other in-kernel GPU drivers code, I tried to patch > > >>them. > > >>It's too bad. > > > > > >I'll bring dri-devel into the loop here. > > > > > >ARM GPU developers please take a look at this stuff, Laurent, Rob, > > >Eric I suppose. > > > > I sent a patch, https://lkml.org/lkml/2015/3/24/1182, and my opinion about compaction > > to ARM GPU developers via Korea ARM branch. > > I got a reply that they had no time to review it. > > > > I hope they're interested to this patch. > > i915 gpus would support 64kb and 2mb pages, but we never implemented this. > I don't think this would fit for gem based drivers since our backing > storage is shmemfs. So if we want to implement page migration (which we'd > probably want to make large pages work well) we'd need to pimp shmem to a) > hand large pages to us b) forward the migrate calls. Probably that means > we need to build our own gemfs reusing shmemfs code.AFAIK there are efforts ongoing to make large pages work with shmem. Kirill, IIRC you mentioned that you're were looking into this a while back? -- Ville Syrj?l? Intel OTC
2015-07-09 ?? 10:08? Daniel Vetter ?(?) ? ?:> Also there's a bit a lack of gpu drivers from the arm world in upstream, > which is probabyl why this patch series doesn't come with a user. Might be > better to first upstream the driver before talking about additional > infrastructure that it needs. > -DanielI'm not from ARM but I just got the idea of driver page migration during I worked with ARM gpu driver. I'm sure this patch is good for zram and balloon and hope it can be applied to drivers consuming many pages and generating fragmentation, such as GPU or gfx driver.