Skip to contentSkip to conversation

Several PSR fixes in libxl

PATCH Applied Chao Peng 5 participants 22 messages Sep 29, 2015 – Sep 30, 2015

lore
Share & tools
lore

Chao Peng

author
#0 lore raw

v2 cover Several PSR fixes in libxl

The patch series basically contain several PSR related fixes in libxl.

patch1-3: fix the socket display error in certain hotplug case.
patch4:   fix a minor range check.
patch5:   improve the PSR document.
patch6:   improve xl man page.

Detailed problem and fix please see commit message.

Change history
v2:
* Address comments from Wei/Dario.
* Add patch6.

Chao Peng (6):
tools/libxl: introduce libxl_get_online_socketmap tools/libxl: fix socket display error for CMT tools/libxl: return socket id from libxl_psr_cat_get_l3_info tools/libxl: fix range check in main_psr_cat_cbm_set
docs: make xl-psr.markdown more precise
docs/man: resort sections

 docs/man/xl.pod.1           | 24 ++++++-------
 docs/misc/xl-psr.markdown   |  8 ++---
 tools/libxl/libxl.h         |  7 ++--
 tools/libxl/libxl_psr.c     | 23 +++++++++---
 tools/libxl/libxl_types.idl |  1 +
 tools/libxl/libxl_utils.c   | 22 ++++++++++++
 tools/libxl/libxl_utils.h   |  2 ++
 tools/libxl/xl_cmdimpl.c    | 86 +++++++++++++++++++++++----------------------
 8 files changed, 107 insertions(+), 66 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 1/6 tools/libxl: introduce libxl_get_online_socketmap

It sets the bit on the given bitmap if the corresponding socket is available and clears the bit when the corresponding socket is not available.

---
v2:
* rename libxl_socket_bitmap_fill => libxl_get_online_socketmap.
* fix blanklines.

NOTE:LIBXL_HAVE_SOCKET_BITMAP_ALLOC is changed as we are still in 4.6 release cycle.

---
 tools/libxl/libxl.h       |  7 ++++---
 tools/libxl/libxl_utils.c | 22 ++++++++++++++++++++++
 tools/libxl/libxl_utils.h |  2 ++
 3 files changed, 28 insertions(+), 3 deletions(-)
tools/libxl/libxl.h +4 -3
index 5f9047c..fa5aedd 100644
@@ -807,11 +807,12 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);
 #define LIBXL_HAVE_PCITOPOLOGY 1
 
 /*
- * LIBXL_HAVE_SOCKET_BITMAP_ALLOC
+ * LIBXL_HAVE_SOCKET_BITMAP
  *
- * If this is defined, then libxl_socket_bitmap_alloc exists.
+ * If this is defined, then libxl_socket_bitmap_alloc and
+ * libxl_get_online_socketmap exist.
  */
-#define LIBXL_HAVE_SOCKET_BITMAP_ALLOC 1
+#define LIBXL_HAVE_SOCKET_BITMAP 1
 
 /*
  * LIBXL_HAVE_SRM_V2
tools/libxl/libxl_utils.c +22 -0
index bfc9699..408ec85 100644
@@ -886,6 +886,28 @@ int libxl_socket_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *socketmap,
 
 }
 
+int libxl_get_online_socketmap(libxl_ctx *ctx, libxl_bitmap *socketmap)
+{
+    libxl_cputopology *tinfo = NULL;
+    int nr_cpus = 0, i, rc = 0;
+
+    tinfo = libxl_get_cpu_topology(ctx, &nr_cpus);
+    if (tinfo == NULL) {
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
+    libxl_bitmap_set_none(socketmap);
+    for (i = 0; i < nr_cpus; i++)
+        if (tinfo[i].socket != XEN_INVALID_SOCKET_ID
+            && !libxl_bitmap_test(socketmap, tinfo[i].socket))
+            libxl_bitmap_set(socketmap, tinfo[i].socket);
+
+ out:
+    libxl_cputopology_list_free(tinfo, nr_cpus);
+    return rc;
+}
+
 int libxl_nodemap_to_cpumap(libxl_ctx *ctx,
                             const libxl_bitmap *nodemap,
                             libxl_bitmap *cpumap)
tools/libxl/libxl_utils.h +2 -0
index 1e5ca8a..339ebdf 100644
@@ -143,6 +143,8 @@ int libxl_node_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *nodemap,
                             int max_nodes);
 int libxl_socket_bitmap_alloc(libxl_ctx *ctx, libxl_bitmap *socketmap,
                               int max_sockets);
+/* Fill socketmap with the CPU topology information on the system. */
+int libxl_get_online_socketmap(libxl_ctx *ctx, libxl_bitmap *socketmap);
 
 /* Populate cpumap with the cpus spanned by the nodes in nodemap */
 int libxl_nodemap_to_cpumap(libxl_ctx *ctx,
Signature · 1 line
1.9.1
Reviewed-by on v2 1/6
#2 lore raw

Re: [PATCH v2 for Xen 4.6 1/6] tools/libxl: introduce libxl_get_online_socketmap

Quoted 4 lines · Chao Peng

It sets the bit on the given bitmap if the corresponding socket is available and clears the bit when the corresponding socket is not available.

Quoted 9 lines

---
v2:
* rename libxl_socket_bitmap_fill => libxl_get_online_socketmap.
* fix blanklines.

NOTE:LIBXL_HAVE_SOCKET_BITMAP_ALLOC is changed as we are still in 4.6 release cycle.

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#4 lore raw

PATCH v2 2/6 tools/libxl: fix socket display error for CMT

In reply to Chao Peng

When displaying the CMT information for all the sockets, we assume socket number is continuous. This is not true in the hotplug case. For instance, when the 3rd socket is plugged out on a 4-socket system, the available sockets numbers are 1,2,4 but current we will display the CMT information for socket 1,2,3.

The fix is getting the socket bitmap for all the sockets on the system first and then displaying CMT information for_each_set_bit in that bitmap.

---
v2:
* add libxl_bitmap_init().

---
 tools/libxl/xl_cmdimpl.c | 43 +++++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 20 deletions(-)
tools/libxl/xl_cmdimpl.c +23 -20
index 2706759..f01d245 100644
@@ -8192,7 +8192,7 @@ static int psr_cmt_get_mem_bandwidth(uint32_t domid,
 
 static void psr_cmt_print_domain_info(libxl_dominfo *dominfo,
                                       libxl_psr_cmt_type type,
-                                      uint32_t nr_sockets)
+                                      libxl_bitmap *socketmap)
 {
     char *domain_name;
     uint32_t socketid;
@@ -8205,7 +8205,7 @@ static void psr_cmt_print_domain_info(libxl_dominfo *dominfo,
     printf("%-40s %5d", domain_name, dominfo->domid);
     free(domain_name);
 
-    for (socketid = 0; socketid < nr_sockets; socketid++) {
+    libxl_for_each_set_bit(socketid, *socketmap) {
         switch (type) {
         case LIBXL_PSR_CMT_TYPE_CACHE_OCCUPANCY:
             if (!libxl_psr_cmt_get_sample(ctx, dominfo->domid, type, socketid,
@@ -8228,9 +8228,9 @@ static void psr_cmt_print_domain_info(libxl_dominfo *dominfo,
 
 static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid)
 {
-    uint32_t i, socketid, nr_sockets, total_rmid;
+    uint32_t i, socketid, total_rmid;
     uint32_t l3_cache_size;
-    libxl_physinfo info;
+    libxl_bitmap socketmap;
     int rc, nr_domains;
 
     if (!libxl_psr_cmt_enabled(ctx)) {
@@ -8244,41 +8244,39 @@ static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid)
         return -1;
     }
 
-    libxl_physinfo_init(&info);
-    rc = libxl_get_physinfo(ctx, &info);
+    libxl_bitmap_init(&socketmap);
+    libxl_socket_bitmap_alloc(ctx, &socketmap, 0);
+    rc = libxl_get_online_socketmap(ctx, &socketmap);
     if (rc < 0) {
-        fprintf(stderr, "Failed getting physinfo, rc: %d\n", rc);
-        libxl_physinfo_dispose(&info);
-        return -1;
+        fprintf(stderr, "Failed getting available sockets, rc: %d\n", rc);
+        goto out;
     }
-    nr_sockets = info.nr_cpus / info.threads_per_core / info.cores_per_socket;
-    libxl_physinfo_dispose(&info);
 
     rc = libxl_psr_cmt_get_total_rmid(ctx, &total_rmid);
     if (rc < 0) {
         fprintf(stderr, "Failed to get max RMID value\n");
-        return -1;
+        goto out;
     }
 
     printf("Total RMID: %d\n", total_rmid);
 
     /* Header */
     printf("%-40s %5s", "Name", "ID");
-    for (socketid = 0; socketid < nr_sockets; socketid++)
+    libxl_for_each_set_bit(socketid, socketmap)
         printf("%14s %d", "Socket", socketid);
     printf("\n");
 
     if (type == LIBXL_PSR_CMT_TYPE_CACHE_OCCUPANCY) {
             /* Total L3 cache size */
             printf("%-46s", "Total L3 Cache Size");
-            for (socketid = 0; socketid < nr_sockets; socketid++) {
+            libxl_for_each_set_bit(socketid, socketmap) {
                 rc = libxl_psr_cmt_get_l3_cache_size(ctx, socketid,
                                                      &l3_cache_size);
                 if (rc < 0) {
                     fprintf(stderr,
                             "Failed to get system l3 cache size for socket:%d\n",
                             socketid);
-                    return -1;
+                    goto out;
                 }
                 printf("%13u KB", l3_cache_size);
             }
@@ -8292,9 +8290,10 @@ static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid)
         libxl_dominfo_init(&dominfo);
         if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
-            return -1;
+            rc = -1;
+            goto out;
         }
-        psr_cmt_print_domain_info(&dominfo, type, nr_sockets);
+        psr_cmt_print_domain_info(&dominfo, type, &socketmap);
         libxl_dominfo_dispose(&dominfo);
     }
     else
@@ -8302,13 +8301,17 @@ static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid)
         libxl_dominfo *list;
         if (!(list = libxl_list_domain(ctx, &nr_domains))) {
             fprintf(stderr, "Failed to get domain info for domain list.\n");
-            return -1;
+            rc = -1;
+            goto out;
         }
         for (i = 0; i < nr_domains; i++)
-            psr_cmt_print_domain_info(list + i, type, nr_sockets);
+            psr_cmt_print_domain_info(list + i, type, &socketmap);
         libxl_dominfo_list_free(list, nr_domains);
     }
-    return 0;
+
+out:
+    libxl_bitmap_dispose(&socketmap);
+    return rc;
 }
 
 int main_psr_cmt_attach(int argc, char **argv)
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH v2 for Xen 4.6 2/6] tools/libxl: fix socket display error for CMT

Quoted 14 lines · Chao Peng

When displaying the CMT information for all the sockets, we assume socket
number is continuous. This is not true in the hotplug case. For instance,
when the 3rd socket is plugged out on a 4-socket system, the available
sockets numbers are 1,2,4 but current we will display the CMT information for socket 1,2,3.

The fix is getting the socket bitmap for all the sockets on the system
first and then displaying CMT information for_each_set_bit in that bitmap.

Quoted 6 lines

---
v2:
* add libxl_bitmap_init().

FWIW, Reviewed-by: Dario Faggioli <[email protected]>

Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#6 lore raw

PATCH v2 3/6 tools/libxl: return socket id from libxl_psr_cat_get_l3_info

In reply to Chao Peng

The entries returned from libxl_psr_cat_get_l3_info are assumed to be socket-continuous. But this is not true in the hotplug case.

This patch gets the socket bitmap for all the sockets on the system first and stores the socket id in the structure libxl_psr_cat_info in libxl_psr_cat_get_l3_info. The xl or similar consumers then can display socket information correctly.

---
v2:
* add libxl_bitmap_init();
* rename target_id to id.
* fix the iteration code in psr_cat_hwinfo().

---
 tools/libxl/libxl_psr.c     | 23 ++++++++++++++++++-----
 tools/libxl/libxl_types.idl |  1 +
 tools/libxl/xl_cmdimpl.c    | 41 ++++++++++++++++++++---------------------
 3 files changed, 39 insertions(+), 26 deletions(-)
tools/libxl/libxl_psr.c +18 -5
index 3378239..30740a1 100644
@@ -339,30 +339,43 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info,
 {
     GC_INIT(ctx);
     int rc;
-    int i, nr_sockets;
+    int i = 0, socket, nr_sockets;
+    libxl_bitmap socketmap;
     libxl_psr_cat_info *ptr;
 
+    libxl_bitmap_init(&socketmap);
+
     rc = libxl__count_physical_sockets(gc, &nr_sockets);
     if (rc) {
         LOGE(ERROR, "failed to get system socket count");
         goto out;
     }
 
+    libxl_socket_bitmap_alloc(ctx, &socketmap, nr_sockets);
+    rc = libxl_get_online_socketmap(ctx, &socketmap);
+    if (rc < 0) {
+        LOGE(ERROR, "failed to get available sockets");
+        goto out;
+    }
+
     ptr = libxl__malloc(NOGC, nr_sockets * sizeof(libxl_psr_cat_info));
 
-    for (i = 0; i < nr_sockets; i++) {
-        if (xc_psr_cat_get_l3_info(ctx->xch, i, &ptr[i].cos_max,
-                                                &ptr[i].cbm_len)) {
+    libxl_for_each_set_bit(socket, socketmap) {
+        ptr[i].id = socket;
+        if (xc_psr_cat_get_l3_info(ctx->xch, socket, &ptr[i].cos_max,
+                                                     &ptr[i].cbm_len)) {
             libxl__psr_cat_log_err_msg(gc, errno);
             rc = ERROR_FAIL;
             free(ptr);
             goto out;
         }
+        i++;
     }
 
     *info = ptr;
-    *nr = nr_sockets;
+    *nr = i;
 out:
+    libxl_bitmap_dispose(&socketmap);
     GC_FREE;
     return rc;
 }
tools/libxl/libxl_types.idl +1 -0
index 9f6ec00..dc84864 100644
@@ -792,6 +792,7 @@ libxl_psr_cbm_type = Enumeration("psr_cbm_type", [
     ])
 
 libxl_psr_cat_info = Struct("psr_cat_info", [
+    ("id", uint32),
     ("cos_max", uint32),
     ("cbm_len", uint32),
     ])
tools/libxl/xl_cmdimpl.c +20 -21

102 lines not on this page · raw message

Signature · 1 line
1.9.1
Reviewed-by on v2 3/6
#7 lore raw

Re: [PATCH v2 for Xen 4.6 3/6] tools/libxl: return socket id from libxl_psr_cat_get_l3_info

Quoted 11 lines · Chao Peng

The entries returned from libxl_psr_cat_get_l3_info are assumed to be socket-continuous. But this is not true in the hotplug case.

This patch gets the socket bitmap for all the sockets on the system first and stores the socket id in the structure libxl_psr_cat_info in libxl_psr_cat_get_l3_info. The xl or similar consumers then can display
socket information correctly.

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v2 3/6
#8 lore raw

Re: [PATCH v2 for Xen 4.6 3/6] tools/libxl: return socket id from libxl_psr_cat_get_l3_info

In reply to Chao Peng
Quoted 9 lines · Chao Peng

The entries returned from libxl_psr_cat_get_l3_info are assumed to be socket-continuous. But this is not true in the hotplug case.

This patch gets the socket bitmap for all the sockets on the system first and stores the socket id in the structure libxl_psr_cat_info in libxl_psr_cat_get_l3_info. The xl or similar consumers then can display socket information correctly.

author
#9 lore raw

PATCH v2 4/6 tools/libxl: fix range check in main_psr_cat_cbm_set

In reply to Chao Peng

The 'end' should be inclusive.

---
 tools/libxl/xl_cmdimpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +1 -1
index 9947dba..639190e 100644
@@ -8524,7 +8524,7 @@ int main_psr_cat_cbm_set(int argc, char **argv)
         len = libxl_string_list_length(&socket_list);
         for (i = 0; i < len; i++) {
             parse_range(socket_list[i], &start, &end);
-            for (j = start; j < end; j++)
+            for (j = start; j <= end; j++)
                 libxl_bitmap_set(&target_map, j);
         }
 
Signature · 1 line
1.9.1
author
#10 lore raw

PATCH v2 5/6 docs: make xl-psr.markdown more precise

In reply to Chao Peng

Drop the chapter number as it can be confusing when it gets changed in the referred document.

---
v2:
* minor commit message adjustment.

---
 docs/misc/xl-psr.markdown | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
docs/misc/xl-psr.markdown +4 -4
index 3545912..737f0f7 100644
@@ -14,7 +14,7 @@ tracks cache utilization of memory accesses according to the RMID and reports
 monitored data via a counter register.
 
 For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Platform Shared Resource Monitoring: Cache Monitoring Technology".
 
 In Xen's implementation, each domain in the system can be assigned a RMID
 independently, while RMID=0 is reserved for monitoring domains that don't
@@ -52,7 +52,7 @@ event type to monitor system total/local memory bandwidth. The same RMID can
 be used to monitor both cache usage and memory bandwidth at the same time.
 
 For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Overview of Cache Monitoring Technology and Memory Bandwidth Monitoring".
 
 In Xen's implementation, MBM shares the same set of underlying monitoring
 service with CMT and can be used to monitor memory bandwidth on a per domain
@@ -92,7 +92,7 @@ For example, assuming a system with 8 portions and 3 domains:
    access to one quarter each.
 
 For more detailed information please refer to Intel SDM chapter
-"17.15 - Platform Shared Resource Control: Cache Allocation Technology".
+"Platform Shared Resource Control: Cache Allocation Technology".
 
 In Xen's implementation, CBM can be configured with libxl/xl interfaces but
 COS is maintained in hypervisor only. The cache partition granularity is per
@@ -130,4 +130,4 @@ Per domain CBM settings can be shown by:
 ## Reference
 
 [1] Intel SDM
-(http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html).
+(http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf).
Signature · 1 line
1.9.1
#11 lore raw

Re: [PATCH v2 for Xen 4.6 5/6] docs: make xl-psr.markdown more precise

Quoted 45 lines · Chao Peng

Drop the chapter number as it can be confusing when it gets changed in the referred document.

---
v2:
* minor commit message adjustment.

---
 docs/misc/xl-psr.markdown | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
docs/misc/xl-psr.markdown +3 -3
index 3545912..737f0f7 100644
@@ -14,7 +14,7 @@ tracks cache utilization of memory accesses according to the RMID and reports
 monitored data via a counter register.
 
 For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Platform Shared Resource Monitoring: Cache Monitoring Technology".
 
 In Xen's implementation, each domain in the system can be assigned a RMID
 independently, while RMID=0 is reserved for monitoring domains that don't
@@ -52,7 +52,7 @@ event type to monitor system total/local memory bandwidth. The same RMID can
 be used to monitor both cache usage and memory bandwidth at the same time.
 
 For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Overview of Cache Monitoring Technology and Memory Bandwidth Monitoring".
 
 In Xen's implementation, MBM shares the same set of underlying monitoring
 service with CMT and can be used to monitor memory bandwidth on a per domain
@@ -92,7 +92,7 @@ For example, assuming a system with 8 portions and 3 domains:
    access to one quarter each.
 
 For more detailed information please refer to Intel SDM chapter
-"17.15 - Platform Shared Resource Control: Cache Allocation Technology".
+"Platform Shared Resource Control: Cache Allocation Technology".
 
 In Xen's implementation, CBM can be configured with libxl/xl interfaces but
 COS is maintained in hypervisor only. The cache partition granularity is per

docs/misc/xl-psr.markdown Per domain CBM settings can be shown by: · line 133

Quoted 5 lines
docs/misc/xl-psr.markdown +1 -1
@@ -130,4 +130,4 @@ Per domain CBM settings can be shown by:
 ## Reference
 
 [1] Intel SDM
-(http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html).
+(http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf).

The other two changes look fine, but this change now points to a specific instance of the SDM, not the most recent version. I would leave the link as it previously was.

~Andrew

#12 lore raw

Re: [PATCH v2 for Xen 4.6 5/6] docs: make xl-psr.markdown more precise

Quoted 62 lines · Andrew Cooper
Quoted 61 lines · Chao Peng

Drop the chapter number as it can be confusing when it gets changed in the referred document.

---
v2:
* minor commit message adjustment.

---
 docs/misc/xl-psr.markdown | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
docs/misc/xl-psr.markdown +0 -0
index 3545912..737f0f7 100644
@@ -14,7 +14,7 @@ tracks cache utilization of memory accesses according

to the RMID and reports
monitored data via a counter register.

For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Platform Shared Resource Monitoring: Cache Monitoring Technology".

In Xen's implementation, each domain in the system can be assigned a
RMID
independently, while RMID=0 is reserved for monitoring domains that
don't

docs/misc/xl-psr.markdown +0 -0
@@ -52,7 +52,7 @@ event type to monitor system total/local memory

bandwidth. The same RMID can
be used to monitor both cache usage and memory bandwidth at the same
time.

For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Overview of Cache Monitoring Technology and Memory Bandwidth Monitoring".

In Xen's implementation, MBM shares the same set of underlying
monitoring
service with CMT and can be used to monitor memory bandwidth on a per
domain

docs/misc/xl-psr.markdown +0 -0
@@ -92,7 +92,7 @@ For example, assuming a system with 8 portions and 3

domains:
access to one quarter each.

For more detailed information please refer to Intel SDM chapter
-"17.15 - Platform Shared Resource Control: Cache Allocation Technology".
+"Platform Shared Resource Control: Cache Allocation Technology".

In Xen's implementation, CBM can be configured with libxl/xl
interfaces but
COS is maintained in hypervisor only. The cache partition granularity
is per

docs/misc/xl-psr.markdown +0 -0
@@ -130,4 +130,4 @@ Per domain CBM settings can be shown by:
 ## Reference
 
Quoted 10 lines
Quoted 6 lines
docs/misc/xl-psr.markdown +0 -1
 [1] Intel SDM
-(http://www.intel.com/content/www/us/en/processors/architectures-softw

are-developer-manuals.html). +(http://www.intel.com/content/dam/www/public/us/en/documents/manuals/6 4-ia-32-architectures-software-developer-system-programming-manual -325384.pdf).

The other two changes look fine, but this change now points to a specific instance of the SDM, not the most recent version. I would leave the link as it previously was.

I agree, we either want a specific revision with specific chapter numbers _or_ an up to date revision with just the titles and no specific chapter numbers. This commit removes the chapter numbers but switches to a specific revision, which is undesirable IMHO.

I therefore intend to drop this last hunk during commit.

Ian.

author
#13 lore raw

Re: [PATCH v2 for Xen 4.6 5/6] docs: make xl-psr.markdown more precise

Quoted 74 lines · Ian Campbell
Quoted 62 lines · Andrew Cooper
Quoted 61 lines · Chao Peng

Drop the chapter number as it can be confusing when it gets changed in the referred document.

---
v2:
* minor commit message adjustment.

---
 docs/misc/xl-psr.markdown | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
docs/misc/xl-psr.markdown +0 -0
index 3545912..737f0f7 100644
@@ -14,7 +14,7 @@ tracks cache utilization of memory accesses according

to the RMID and reports
monitored data via a counter register.

For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Platform Shared Resource Monitoring: Cache Monitoring Technology".

In Xen's implementation, each domain in the system can be assigned a
RMID
independently, while RMID=0 is reserved for monitoring domains that
don't

docs/misc/xl-psr.markdown +0 -0
@@ -52,7 +52,7 @@ event type to monitor system total/local memory

bandwidth. The same RMID can
be used to monitor both cache usage and memory bandwidth at the same
time.

For more detailed information please refer to Intel SDM chapter
-"17.14 - Platform Shared Resource Monitoring: Cache Monitoring Technology".
+"Overview of Cache Monitoring Technology and Memory Bandwidth Monitoring".

In Xen's implementation, MBM shares the same set of underlying
monitoring
service with CMT and can be used to monitor memory bandwidth on a per
domain

docs/misc/xl-psr.markdown +0 -0
@@ -92,7 +92,7 @@ For example, assuming a system with 8 portions and 3

domains:
access to one quarter each.

For more detailed information please refer to Intel SDM chapter
-"17.15 - Platform Shared Resource Control: Cache Allocation Technology".
+"Platform Shared Resource Control: Cache Allocation Technology".

In Xen's implementation, CBM can be configured with libxl/xl
interfaces but
COS is maintained in hypervisor only. The cache partition granularity
is per

docs/misc/xl-psr.markdown +0 -0
@@ -130,4 +130,4 @@ Per domain CBM settings can be shown by:
 ## Reference
 
Quoted 10 lines
Quoted 6 lines
docs/misc/xl-psr.markdown +0 -1
 [1] Intel SDM
-(http://www.intel.com/content/www/us/en/processors/architectures-softw

are-developer-manuals.html). +(http://www.intel.com/content/dam/www/public/us/en/documents/manuals/6 4-ia-32-architectures-software-developer-system-programming-manual -325384.pdf).

The other two changes look fine, but this change now points to a specific instance of the SDM, not the most recent version. I would leave the link as it previously was.

Quoted 6 lines

I agree, we either want a specific revision with specific chapter numbers _or_ an up to date revision with just the titles and no specific chapter numbers. This commit removes the chapter numbers but switches to a specific revision, which is undesirable IMHO.

I therefore intend to drop this last hunk during commit.

I feel confortable, too. Actually this is a suggestion from Lars during he reviewing the documents for the 4.6 release. Because when one opens the generic page he/she will see several options (combined volume set, three-volume set and seven-volume set), it may be not easy to find out the related chapters and especially because we have chapter number which is actually from the three-volume set, in such case it does look a bit confusing.

As now we have removed the chapter number, then the confusion doesn't exit because one can grab any volume set and will find the related chapters. I think this addressed Lars' concern.

Chao

#14 lore raw

Re: [PATCH v2 for Xen 4.6 5/6] docs: make xl-psr.markdown more precise

Quoted 24 lines · Chao Peng
Quoted 23 lines · Ian Campbell
Quoted 13 lines · Andrew Cooper
Quoted 8 lines · Chao Peng

[1] Intel SDM
-(http://www.intel.com/content/www/us/en/processors/architectures-s oftw
are-developer-manuals.html). +(http://www.intel.com/content/dam/www/public/us/en/documents/manua ls/6 4-ia-32-architectures-software-developer-system-programming-manual -325384.pdf).

The other two changes look fine, but this change now points to a specific instance of the SDM, not the most recent version. I would leave the link as it previously was.

I agree, we either want a specific revision with specific chapter numbers
_or_ an up to date revision with just the titles and no specific chapter
numbers. This commit removes the chapter numbers but switches to a specific
revision, which is undesirable IMHO.

Quoted 3 lines
Quoted 1 line

I therefore intend to drop this last hunk during commit.

I feel confortable, too.

Thanks for confirming.

Quoted 7 lines

Actually this is a suggestion from Lars during
he reviewing the documents for the 4.6 release. Because when one opens the generic page he/she will see several options (combined volume set, three-volume set and seven-volume set), it may be not easy to find out the related chapters and especially because we have chapter number which is actually from the three-volume set, in such case it does look a bit confusing.

Right. Would it be worth mentioning the specific volume which is of interest as a guide?

Quoted 7 lines

As now we have removed the chapter number, then the confusion doesn't exit because one can grab any volume set and will find the related chapters. I think this addressed Lars' concern.

Chao

author
#15 lore raw

Re: [PATCH v2 for Xen 4.6 5/6] docs: make xl-psr.markdown more precise

Quoted 10 lines
Quoted 7 lines

Actually this is a suggestion from Lars during
he reviewing the documents for the 4.6 release. Because when one opens the generic page he/she will see several options (combined volume set, three-volume set and seven-volume set), it may be not easy to find out the related chapters and especially because we have chapter number which is actually from the three-volume set, in such case it does look a bit confusing.

Right. Would it be worth mentioning the specific volume which is of interest as a guide?

I think it would be good to have such info. While I also think is's not a big deal, I feel okay without it.

Quoted 13 lines
Quoted 8 lines

As now we have removed the chapter number, then the confusion doesn't exit because one can grab any volume set and will find the related chapters. I think this addressed Lars' concern.

Chao

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#16 lore raw

PATCH v2 6/6 docs/man: resort sections

In reply to Chao Peng

Section 'IGNORED FOR COMPATIBILITY WITH XM' separates 'CACHE MONITORING TECHNOLOGY' and 'CACHE ALLOCATION TECHNOLOGY' but they really should be put together.

---
Current incorrect output can be seen at:
http://xenbits.xen.org/docs/unstable/man/xl.1.html

---
 docs/man/xl.pod.1 | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
docs/man/xl.pod.1 +12 -12
index f22c3f3..d0cd612 100644
@@ -1509,18 +1509,6 @@ monitor types are:
 
 =back
 
-=head1 IGNORED FOR COMPATIBILITY WITH XM
-
-xl is mostly command-line compatible with the old xm utility used with
-the old Python xend.  For compatibility, the following options are
-ignored:
-
-=over 4
-
-=item B<xl migrate --live>
-
-=back
-
 =head2 CACHE ALLOCATION TECHNOLOGY
 
 Intel Broadwell and later server platforms offer capabilities to configure and
@@ -1553,6 +1541,18 @@ Show CAT settings for a certain domain or all domains.
 
 =back
 
+=head1 IGNORED FOR COMPATIBILITY WITH XM
+
+xl is mostly command-line compatible with the old xm utility used with
+the old Python xend.  For compatibility, the following options are
+ignored:
+
+=over 4
+
+=item B<xl migrate --live>
+
+=back
+
 =head1 TO BE DOCUMENTED
 
 We need better documentation for:
Signature · 1 line
1.9.1
Reviewed-by on v2 6/6
#17 lore raw

Re: [PATCH v2 for Xen 4.6 6/6] docs/man: resort sections

Quoted 6 lines · Chao Peng

Section 'IGNORED FOR COMPATIBILITY WITH XM' separates 'CACHE MONITORING
TECHNOLOGY' and 'CACHE ALLOCATION TECHNOLOGY' but they really should be
put together.

Indeed.

Quoted 2 lines

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#19 lore raw
In reply to Chao Peng

Now the reasoning bits. Yes, I'm arguing with myself, :-)

We can of course fix it post-4.6, but the released APIs need to be maintained forever (even if it is in fact broken). That would definitely involve lots of compatibility cruft if we fix it post 4.6.

This patch series is simple enough to reason about and has received adequate review from expert in the field, so I have hight confidence in it being correct.

I think the benefit of accepting it out-weights the downside.

Wei.

Applied
#20 lore raw
Quoted 11 lines · Wei Liu

Now the reasoning bits. Yes, I'm arguing with myself, :-)

We can of course fix it post-4.6, but the released APIs need to be maintained forever (even if it is in fact broken). That would definitely involve lots of compatibility cruft if we fix it post 4.6.

This patch series is simple enough to reason about and has received adequate review from expert in the field, so I have hight confidence in it being correct.

I think the benefit of accepting it out-weights the downside.

Applied all 6 to staging and staging-4.6, with the one tweak discussed in reply to #5.

author
#21 lore raw
Quoted 7 lines · Ian Campbell
Quoted 6 lines · Wei Liu

Now the reasoning bits. Yes, I'm arguing with myself, :-)

We can of course fix it post-4.6, but the released APIs need to be maintained forever (even if it is in fact broken). That would definitely involve lots of compatibility cruft if we fix it post 4.6.

Quoted 8 lines
Quoted 5 lines

This patch series is simple enough to reason about and has received adequate review from expert in the field, so I have hight confidence in it being correct.

I think the benefit of accepting it out-weights the downside.

Applied all 6 to staging and staging-4.6, with the one tweak discussed in reply to #5.

I see, thanks for the quick action and allow them to go into 4.6.

Chao