Skip to contentSkip to conversation

drm/nv50: let applications hanging on vm flush to be killed

PATCH In review Marcin Slusarz 3 participants 3 messages Apr 22, 2012 – Apr 23, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 drm/nv50: let applications hanging on vm flush to be killed

---
 drivers/gpu/drm/nouveau/nv50_graph.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nv50_graph.c +5 -0
index 6899547..a61853f 100644
@@ -435,6 +435,11 @@ nv84_graph_tlb_flush(struct drm_device *dev, int engine)
 			if ((tmp & 7) == 1)
 				idle = false;
 		}
+
+		if (fatal_signal_pending(current)) {
+			ret = -ERESTARTSYS;
+			break;
+		}
 	} while (!idle && !(timeout = ptimer->read(dev) - start > 2000000000));
 
 	if (timeout) {
Signature · 1 line
1.7.8.5

A message that is not in the archive (sent off-list or not yet received): 1335133112-8008-4-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 11 lines · Marcin Slusarz
---
  drivers/gpu/drm/nouveau/nv50_graph.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nv50_graph.c +0 -0
index 6899547..a61853f 100644
@@ -435,6 +435,11 @@ nv84_graph_tlb_flush(struct drm_device *dev, int engine)
  			if ((tmp&  7) == 1)

drivers/gpu/drm/nouveau/nv50_graph.c nv84_graph_tlb_flush(struct drm_device *dev, int engine) · line 445

Quoted 10 lines
drivers/gpu/drm/nouveau/nv50_graph.c +5 -0
  				idle = false;
  		}
+
+		if (fatal_signal_pending(current)) {
+			ret = -ERESTARTSYS;
+			break;
+		}
  	} while (!idle&&  !(timeout = ptimer->read(dev) - start>  2000000000));
 
  	if (timeout) {

Good, but who should send the kill signal in the first place?

Shouldn't nouveau drm terminate the process(es) associated with the channel that generated the lockup ?

Can you provide more info on how the lockup recovery works?

Thanks in advance,
Martin

#3 lore raw
Quoted 21 lines · Martin Peres
Quoted 20 lines · Marcin Slusarz
---
  drivers/gpu/drm/nouveau/nv50_graph.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/nouveau/nv50_graph.c +5 -0
index 6899547..a61853f 100644
@@ -435,6 +435,11 @@ nv84_graph_tlb_flush(struct drm_device *dev, int engine)
  			if ((tmp&  7) == 1)
  				idle = false;
  		}
+
+		if (fatal_signal_pending(current)) {
+			ret = -ERESTARTSYS;
+			break;
+		}
  	} while (!idle&&  !(timeout = ptimer->read(dev) - start>  2000000000));
 
Quoted 5 lines

drivers/gpu/drm/nouveau/nv50_graph.c nv84_graph_tlb_flush(struct drm_device *dev, int engine) · line 445

Quoted 1 line
drivers/gpu/drm/nouveau/nv50_graph.c +0 -0
  	if (timeout) {

Good, but who should send the kill signal in the first place?

Shouldn't nouveau drm terminate the process(es) associated with the channel that generated the lockup ?

Well, this patch is not necessary for gpu reset - it's just "let's be nice" change. Currently application is unkillable when hanging on vm flush

Marcin
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel