Hi Brice, > I don't like long names like that :) I currently vote for --intersect > here since this option list the indexes of all objects that intersect > the input within the given depth or type. I don't mind long descriptive names. I'm copying options usually from man page or ./command --help output. Of course, if there is good short name it's the best!
> --intersect <type|depth> > Find the list of objects of the given type or depth that > intersect the CPU set and report the comma-separated list of their > indexes instead of the cpu mask string. This may be used for determining > the list of objects above or below the input objects. When combined > with --physical, the list is convenient to pass to external tools such as > taskset or numactl --physcpubind or --membind. This is different from > --largest since the latter requires that all reported objects are strictly > included inside the input objects. Cool! :-) > > > 2) I would rename --objects to something like > > --info_about_nearest_ancestor > > or perhaps just > > --ancestor > > I currently vote for --largest (or something about > summarizing/synthetizing) since this option groups input objects and > summarizes them into larger ancestors. > > --largest Report the list of largest objects exactly included of the input > objects. None of these output objects intersect each other, and the > sum of them is exactly equivalent to the input. No largest object is > included in the input This is different from --intersect where > reported objects may not be strictly included in the input. IMHo, it's also very good name for this option. I would however rephrase help message: "Report the list of largest objects which completely include all input objects IN THE HUMAN READABLE FORMAT." It took me a while to understand how user could benefit from such option. Now I see it:-) Please be sure to include some examples. ===================================== Machine (4025MB) cpuset=0x0000ffff NUMANode #0 (phys=0 2005MB) cpuset=0x00005555 Socket #0 cpuset=0x00005555 L3 #0 (12MB) cpuset=0x00005555 L2 #0 (256KB) cpuset=0x00000101 L1 #0 (32KB) cpuset=0x00000101 Core #0 cpuset=0x00000101 PU #0 (phys=0) cpuset=0x00000001 PU #1 (phys=8) cpuset=0x00000100 L2 #1 (256KB) cpuset=0x00000404 L1 #1 (32KB) cpuset=0x00000404 Core #1 cpuset=0x00000404 PU #2 (phys=2) cpuset=0x00000004 PU #3 (phys=10) cpuset=0x00000400 L2 #2 (256KB) cpuset=0x00001010 L1 #2 (32KB) cpuset=0x00001010 Core #2 cpuset=0x00001010 PU #4 (phys=4) cpuset=0x00000010 PU #5 (phys=12) cpuset=0x00001000 L2 #3 (256KB) cpuset=0x00004040 L1 #3 (32KB) cpuset=0x00004040 Core #3 cpuset=0x00004040 PU #6 (phys=6) cpuset=0x00000040 PU #7 (phys=14) cpuset=0x00004000 NUMANode #1 (phys=1 2020MB) cpuset=0x0000aaaa Socket #1 cpuset=0x0000aaaa L3 #1 (12MB) cpuset=0x0000aaaa L2 #4 (256KB) cpuset=0x00000202 L1 #4 (32KB) cpuset=0x00000202 Core #4 cpuset=0x00000202 PU #8 (phys=1) cpuset=0x00000002 PU #9 (phys=9) cpuset=0x00000200 L2 #5 (256KB) cpuset=0x00000808 L1 #5 (32KB) cpuset=0x00000808 Core #5 cpuset=0x00000808 PU #10 (phys=3) cpuset=0x00000008 PU #11 (phys=11) cpuset=0x00000800 L2 #6 (256KB) cpuset=0x00002020 L1 #6 (32KB) cpuset=0x00002020 Core #6 cpuset=0x00002020 PU #12 (phys=5) cpuset=0x00000020 PU #13 (phys=13) cpuset=0x00002000 L2 #7 (256KB) cpuset=0x00008080 L1 #7 (32KB) cpuset=0x00008080 Core #7 cpuset=0x00008080 PU #14 (phys=7) cpuset=0x00000080 PU #15 (phys=15) cpuset=0x00008000 ============================================= [root@dell-per810-01 utils]# hwloc-calc proc:0 0x00000001 [root@dell-per810-01 utils]# hwloc-calc proc:0-1 0x00000101 [root@dell-per810-01 utils]# hwloc-calc --objects proc:0 PU:0 [root@dell-per810-01 utils]# hwloc-calc --objects proc:0-1 L2Cache:0 [root@dell-per810-01 utils]# hwloc-calc --objects proc:0-5 L2Cache:0 L2Cache:1 L2Cache:2 [root@dell-per810-01 utils]# hwloc-calc --objects proc:0-7 NUMANode:0 Another example [root@amd-dinar-02 utils]# hwloc-calc --objects $(hwloc-distrib --single 4) L2Cache:0 L2Cache:6 L2Cache:12 L2Cache:18 [root@amd-dinar-02 utils]# hwloc-calc $(hwloc-distrib --single 4) 0x00041041 [root@amd-dinar-02 utils]# hwloc-distrib --single 4 0x00000001 0x00000040 0x00001000 0x00040000 > > You may consider to add option > > --all_ancestors (or perhaps ancestors-tree or family-tree) > > to list the full tree of ancestors objects > > This one might be better in hwloc-info (if we split it out of lstopo) or > lstopo. I completely agree. Thanks Jirka