Skip to contentSkip to conversation

common/gnttab: Process softirqs while dumping grant tables

PATCH In review Andrew Cooper 4 participants 6 messages Apr 5, 2019 – Apr 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/gnttab: Process softirqs while dumping grant tables

OSSTests upgrade to Jessie has identified that with a sufficiently large grant table, a watchdog timeout can occur.

http://logs.test-lab.xenproject.org/osstest/logs/134399/test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow/serial-chardonnay0.log

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Ian Jackson <[email protected]>

---
 xen/common/grant_table.c | 3 +++
 1 file changed, 3 insertions(+)
xen/common/grant_table.c +3 -0
index 80728ea..344b3ee 100644
@@ -3956,6 +3956,9 @@ static void gnttab_usage_print(struct domain *rd)
         uint16_t status;
         uint64_t frame;
 
+        if ( !(ref & 31) )
+            process_pending_softirqs();
+
         act = active_entry_acquire(gt, ref);
         if ( !act->pin )
         {
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

Hi Andrew,

Quoted 4 lines · Andrew Cooper

OSSTests upgrade to Jessie has identified that with a sufficiently large grant table, a watchdog timeout can occur.

http://logs.test-lab.xenproject.org/osstest/logs/134399/test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow/serial-chardonnay0.log

OSSTest log usually disappear after a few days. Who it be possible to copy the relevant part of the log instead?

Cheers,

Quoted 29 lines

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Ian Jackson <[email protected]>

---
  xen/common/grant_table.c | 3 +++
  1 file changed, 3 insertions(+)
xen/common/grant_table.c +3 -0
index 80728ea..344b3ee 100644
@@ -3956,6 +3956,9 @@ static void gnttab_usage_print(struct domain *rd)
          uint16_t status;
          uint64_t frame;
 
+        if ( !(ref & 31) )
+            process_pending_softirqs();
+
          act = active_entry_acquire(gt, ref);
          if ( !act->pin )
          {
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw
Quoted 7 lines · Julien Grall

Hi Andrew,

Quoted 4 lines · Andrew Cooper

OSSTests upgrade to Jessie has identified that with a sufficiently large grant
table, a watchdog timeout can occur.

Quoted 5 lines
Quoted 2 lines

http://logs.test-lab.xenproject.org/osstest/logs/134399/test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow/serial-chardonnay0.log

OSSTest log usually disappear after a few days. Who it be possible to copy the relevant part of the log instead?

Can do.  Something like:

(XEN) gnttab_usage_print_all [ key 'g' pressed

Apr  4 20:51:42.779992 (XEN)       -------- active --------       -------- shared --------
Apr  4 20:51:42.780081 (XEN) [ref] localdom mfn      pin          localdom gmfn     flags
Apr  4 20:51:42.791855 (XEN) grant-table for remote d0 (v1)
Apr  4 20:51:42.791915 (XEN)   1 frames (64 max), 11 maptrack frames (1024 max)
Apr  4 20:51:42.803911 (XEN) no active grant table entries
Apr  4 20:51:42.803975 (XEN)       -------- active --------       -------- shared --------
Apr  4 20:51:42.804034 (XEN) [ref] localdom mfn      pin          localdom gmfn     flags
Apr  4 20:51:42.815923 (XEN) grant-table for remote d1 (v1)
Apr  4 20:51:42.816040 (XEN)   7 frames (32 max), 0 maptrack frames (1024 max)
Apr  4 20:51:42.827834 (XEN) [0x000]      0 0x27e306 0x00000002          0 0x0fefff 0x19
Apr  4 20:51:42.827877 (XEN) [0x009]      0 0x22d9a1 0x00000001          0 0x02f3a1 0x19
Apr  4 20:51:42.827905 (XEN) [0x00a]      0 0x22d99f 0x00000001          0 0x02f39f 0x19
<snip masses of output>
Apr  4 20:51:49.814701 (XEN) [0x8af]      0 0x232f4f 0x00000001          0 0x029d4f 0x19
Apr  4 20:51:49.826827 (XEN) [0x8b0]      0 0x232f4e 0x00000001          0 0x029(XEN) Watchdog timer detects that CPU0 is stuck!
Apr  4 20:51:49.826903 (XEN) ----[ Xen-4.13-unstable  x86_64  debug=y   Not tainted ]----

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw

Hi,

Quoted 5 lines · Andrew Cooper
Quoted 2 lines · Julien Grall

On 05/04/2019 17:33, Andrew Cooper wrote:
OSSTest log usually disappear after a few days. Who it be possible to copy the relevant part of the log instead?

Can do.  Something like: > (XEN) gnttab_usage_print_all [ key 'g' pressed

Quoted 16 lines
Apr  4 20:51:42.779992 (XEN)       -------- active --------       -------- shared --------
Apr  4 20:51:42.780081 (XEN) [ref] localdom mfn      pin          localdom gmfn     flags
Apr  4 20:51:42.791855 (XEN) grant-table for remote d0 (v1)
Apr  4 20:51:42.791915 (XEN)   1 frames (64 max), 11 maptrack frames (1024 max)
Apr  4 20:51:42.803911 (XEN) no active grant table entries
Apr  4 20:51:42.803975 (XEN)       -------- active --------       -------- shared --------
Apr  4 20:51:42.804034 (XEN) [ref] localdom mfn      pin          localdom gmfn     flags
Apr  4 20:51:42.815923 (XEN) grant-table for remote d1 (v1)
Apr  4 20:51:42.816040 (XEN)   7 frames (32 max), 0 maptrack frames (1024 max)
Apr  4 20:51:42.827834 (XEN) [0x000]      0 0x27e306 0x00000002          0 0x0fefff 0x19
Apr  4 20:51:42.827877 (XEN) [0x009]      0 0x22d9a1 0x00000001          0 0x02f3a1 0x19
Apr  4 20:51:42.827905 (XEN) [0x00a]      0 0x22d99f 0x00000001          0 0x02f39f 0x19
<snip masses of output>
Apr  4 20:51:49.814701 (XEN) [0x8af]      0 0x232f4f 0x00000001          0 0x029d4f 0x19
Apr  4 20:51:49.826827 (XEN) [0x8b0]      0 0x232f4e 0x00000001          0 0x029(XEN) Watchdog timer detects that CPU0 is stuck!
Apr  4 20:51:49.826903 (XEN) ----[ Xen-4.13-unstable  x86_64  debug=y   Not tainted ]----

This would work for me.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#4 lore raw
In reply to Andrew Cooper
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 05.04.19 at 18:33, <[email protected]> wrote:

OSSTests upgrade to Jessie has identified that with a sufficiently large grant table, a watchdog timeout can occur.

How's this dependent on the precise distro version? I.e. is there something that makes the logging slower now?

xen/common/grant_table.c static void gnttab_usage_print(struct domain *rd) · line 3960

Quoted 8 lines
xen/common/grant_table.c +2 -0
@@ -3956,6 +3956,9 @@ static void gnttab_usage_print(struct domain *rd)
         uint16_t status;
         uint64_t frame;
 
+        if ( !(ref & 31) )
+            process_pending_softirqs();

I think this is both risky and overly eager: Risky because of happening with a lock held, and overly eager because no output may have been done at all between any two such calls. That notwithstanding

on the basis that it is an improvement, and the risk is - afaict - a latent one only.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel