diff options
| author | Karel Zak <kzak@redhat.com> | 2020-07-16 12:41:35 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2020-11-13 09:19:02 +0100 |
| commit | fd35a1dae62f5232cab5fba5bbe1fbef5a92d777 (patch) | |
| tree | ef864a48797a6fd06e558d11d28c6a7ade5748be /sys-utils/lscpu-api.h | |
| parent | f669523ba023343b7e50342782cf17a3b638d504 (diff) | |
| download | util-linux-fd35a1dae62f5232cab5fba5bbe1fbef5a92d777.tar.gz | |
lsblk: add lscpu_read_topology_polarization()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu-api.h')
| -rw-r--r-- | sys-utils/lscpu-api.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sys-utils/lscpu-api.h b/sys-utils/lscpu-api.h index 2cfff7e349..614512f420 100644 --- a/sys-utils/lscpu-api.h +++ b/sys-utils/lscpu-api.h @@ -46,10 +46,9 @@ struct lscpu_cputype { char *flags; char *mtid; /* maximum thread id (s390) */ char *addrsz; /* address sizes */ - int dispatching; /* none, horizontal or vertical */ + int dispatching; /* -1 if not evailable, DIST_* */ int freqboost; /* -1 if not evailable */ - int *polarization; /* cpu polarization */ int *addresses; /* physical cpu addresses */ int *configured; /* cpu configured */ int physsockets; /* Physical sockets (modules) */ @@ -69,6 +68,21 @@ struct lscpu_cputype { cpu_set_t **drawermaps; }; +/* dispatching modes */ +enum { + DISP_HORIZONTAL = 0, + DISP_VERTICAL = 1 +}; + +/* cpu polarization */ +enum { + POLAR_UNKNOWN = 0, + POLAR_VLOW, + POLAR_VMEDIUM, + POLAR_VHIGH, + POLAR_HORIZONTAL +}; + struct lscpu_cpu { int refcount; struct lscpu_cputype *type; @@ -83,6 +97,9 @@ struct lscpu_cpu { int socketid; int bookid; int drawerid; + + int polarization; /* POLAR_* */ + }; struct lscpu_arch { @@ -193,6 +210,7 @@ int lscpu_read_numas(struct lscpu_cxt *cxt); int lscpu_read_topology(struct lscpu_cxt *cxt); int lscpu_read_topology_ids(struct lscpu_cxt *cxt); +int lscpu_read_topology_polarization(struct lscpu_cxt *cxt); void lscpu_cputype_free_topology(struct lscpu_cputype *ct); struct lscpu_arch *lscpu_read_architecture(struct lscpu_cxt *cxt); |
