shinpei0208 / gdev

First-Class GPU Resource Management: Device Drivers, Runtimes, and CUDA Compilers for Nouveau.
http://www.pdsl.jp/
MIT License
350 stars 70 forks source link

GTX480(nvc0): Error in the generation of many contexts #15

Open yk-fujii opened 11 years ago

yk-fujii commented 11 years ago

Error occurs when you try to generate more than a certain context. In my environment (Fedora 15: linux3.3.0, GTX480, 4 virtual devices created, each devices are 25% bandwidth ), I get up when you generated the context of the 18 th.

*Error Logs ( I have changed a little debugging information Gdev...)

 Mar 27 10:38:57 fermi kernel: [  259.724272] [DEBUG_INFO]:gdev#1,gdev_ctx_new
 Mar 27 10:38:57 fermi kernel: [  259.724567] [DEBUG_INFO]:gdev#1,context create #19
 Mar 27 10:38:57 fermi kernel: [  259.724570] [drm] nouveau 0000:01:00.0: PFIFO: read fault at 0x935bac0000 [PT_NOT_PRESENT] from PGRAPH/GPC3/(unknown enum 0x00000002) on channel 0x0030e1e000
 Mar 27 10:38:57 fermi kernel: [  259.724574] [drm] nouveau 0000:01:00.0: PFIFO: unknown status 0x40000000

Anyway, I was addressed by adding/changing a source below. Is required to resolve this issue....

*gdev_drv_nvidia.c:

 struct gdev_device *gdev_raw_dev_open(int minor)
 {        
          struct gdev_device *gdev = &gdev_vds[minor]; /* virutal device */
          struct gdev_device *phys = gdev->parent;
          if(phys){
retry:
              gdev_lock(&phys->global_lock);
              if(phys->users >= GDEV_CONTEXT_LIMIT){
                  gdev_unlock(&phys->global_lock);
                  schedule_timeout(5);
                  goto retry;
              }
              phys->users++; 
              gdev_unlock(&phys->global_lock);
          }
          gdev->users++;     
          return gdev;       
}      
yk-fujii commented 11 years ago

temporary addressing @9dfe3204a5bdaf05298bd4e7063c927beb1774c4