[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hi > > around this bugs with proper logging (absent in this patch) much better > > than lockup. > > But your workaround isn't harmless. It adds new failure modes for other > cases that currently work. That's worse, not better. I think that from user scope nothing (including Xorg crash) is wort

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hi > Obviously if we have a dead gpu, we need to break out of this loop. But > detecting a dead gpu (and returning an appropriate error like EIO) is the > kernel's job. In my case gpu isn't really dead. It works after some ioctl skip. I understend that it is a driver bug in any case, but i thing t

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hello > > It seems, that limiting ioctl restarting by some resonable number of trys > > is a dirty but working way to prevent Xorg lockups. > > And you have audited all callpaths to make sure that they can handle > EINTR? Up until now it was part of the libdrm api that it did not return > EINTR..

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Adam Jackson
On Mon, 2012-04-16 at 12:54 +0400, Anton V. Boyarshinov wrote: > Hi > > > Obviously if we have a dead gpu, we need to break out of this loop. But > > detecting a dead gpu (and returning an appropriate error like EIO) is the > > kernel's job. > In my case gpu isn't really dead. It works after some

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hi > > around this bugs with proper logging (absent in this patch) much better > > than lockup. > > But your workaround isn't harmless. It adds new failure modes for other > cases that currently work. That's worse, not better. I think that from user scope nothing (including Xorg crash) is wort

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Adam Jackson
On Mon, 2012-04-16 at 12:54 +0400, Anton V. Boyarshinov wrote: > Hi > > > Obviously if we have a dead gpu, we need to break out of this loop. But > > detecting a dead gpu (and returning an appropriate error like EIO) is the > > kernel's job. > In my case gpu isn't really dead. It works after some

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hi > Obviously if we have a dead gpu, we need to break out of this loop. But > detecting a dead gpu (and returning an appropriate error like EIO) is the > kernel's job. In my case gpu isn't really dead. It works after some ioctl skip. I understend that it is a driver bug in any case, but i thing

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-16 Thread Anton V. Boyarshinov
Hello > > It seems, that limiting ioctl restarting by some resonable number of trys > > is a dirty but working way to prevent Xorg lockups. > > And you have audited all callpaths to make sure that they can handle > EINTR? Up until now it was part of the libdrm api that it did not return > EINTR..

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Ville Syrjälä
On Fri, Apr 13, 2012 at 03:42:16PM +0200, Daniel Vetter wrote: > On Fri, Apr 13, 2012 at 05:26:42PM +0400, Anton V. Boyarshinov wrote: > > In some cases ioclt->alarm->ioctl loop can be infinite: > > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > > --- SIGALRM (Alarm clo

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Anton V. Boyarshinov
In some cases ioclt->alarm->ioctl loop can be infinite: ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- sigreturn() = ? (mask now []) ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted)

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Daniel Vetter
On Fri, Apr 13, 2012 at 05:26:42PM +0400, Anton V. Boyarshinov wrote: > In some cases ioclt->alarm->ioctl loop can be infinite: > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > --- SIGALRM (Alarm clock) @ 0 (0) --- > sigreturn() = ? (mask now

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Chris Wilson
On Fri, 13 Apr 2012 17:26:42 +0400, "Anton V. Boyarshinov" wrote: > In some cases ioclt->alarm->ioctl loop can be infinite: > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > --- SIGALRM (Alarm clock) @ 0 (0) --- > sigreturn() = ? (mask now []

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Ville Syrjälä
On Fri, Apr 13, 2012 at 03:42:16PM +0200, Daniel Vetter wrote: > On Fri, Apr 13, 2012 at 05:26:42PM +0400, Anton V. Boyarshinov wrote: > > In some cases ioclt->alarm->ioctl loop can be infinite: > > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > > --- SIGALRM (Alarm clo

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Daniel Vetter
On Fri, Apr 13, 2012 at 05:26:42PM +0400, Anton V. Boyarshinov wrote: > In some cases ioclt->alarm->ioctl loop can be infinite: > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > --- SIGALRM (Alarm clock) @ 0 (0) --- > sigreturn() = ? (mask now

Re: [PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Chris Wilson
On Fri, 13 Apr 2012 17:26:42 +0400, "Anton V. Boyarshinov" wrote: > In some cases ioclt->alarm->ioctl loop can be infinite: > ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) > --- SIGALRM (Alarm clock) @ 0 (0) --- > sigreturn() = ? (mask now [

[PATCH] xf86drm.c: add counter for ioctl restarting

2012-04-13 Thread Anton V. Boyarshinov
In some cases ioclt->alarm->ioctl loop can be infinite: ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- sigreturn() = ? (mask now []) ioctl(7, 0x40086482, 0xbfb62738)= ? ERESTARTSYS (To be restarted)