intel / ipmctl

BSD 3-Clause "New" or "Revised" License
183 stars 62 forks source link

ipmctl doesn't warn you when mode can't be set #121

Open eberroca opened 4 years ago

eberroca commented 4 years ago

Hello,

There is a situation where ipmctl silently accept goals (mode changes) even though they can't be set because a particular memory mode is hardcoded in the BIOS. The situation is the following:

-- 1LM (app-direct) set in the BIOS -- Machine boots OS and in 1LM (app-direct) -- Run ipmctl to change machine to memory mode. The tool accepts the goal and suggests a reboot -- After reboot, app-direct regions are gone, but machine is not in 2LM. All the apache pass capacity shows as inaccessible.

Although this is surely not ipmctl's fault (it is the user), it would be great if the tool would warn the user about these kinds of configuration mismatches. At least to avoid headaches and clueless debugging.

kellycouch commented 4 years ago

Agree. Intent is for ipmctl to proactively warn of any configuration that is expected not to succeed per user request.

kellycouch commented 4 years ago

Will you please provide the exact ipmctl command line used for repro and the output presented?

eberroca commented 4 years ago

I run:

ipmctl create -f -goal MemoryMode=100

SocketID | DimmID | MemorySize | AppDirect1Size | AppDirect2Size 0x0000 | 0x0001 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0101 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1001 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1101 | 126.000 GiB | 0.000 GiB | 0.000 GiB A reboot is required to process new memory allocation goals.

After rebooting, memory mode is not activated and this is ipmctl output for memory resources:

ipmctl show -memoryresources

Capacity=505.689 GiB MemoryCapacity=0.000 GiB AppDirectCapacity=0.000 GiB UnconfiguredCapacity=0.000 GiB InaccessibleCapacity=505.689 GiB ReservedCapacity=0.000 GiB

kellycouch commented 4 years ago

I see that you are using the force option. One use of the force option is specifically to bypass any warnings (can be used by scripts). If you issue the same command without the force option, you should get a warning message like below:

ipmctl create -goal MemoryMode=100

The following configuration will be applied: SocketID | DimmID | MemorySize | AppDirect1Size | AppDirect2Size

0x0000 | 0x0001 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0011 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0021 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0101 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0111 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0000 | 0x0121 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1011 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1021 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1001 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1111 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1121 | 126.000 GiB | 0.000 GiB | 0.000 GiB 0x0001 | 0x1101 | 126.000 GiB | 0.000 GiB | 0.000 GiB The requested goal will result in Memory Mode capacity that is unusable with the currently selected platform BIOS volatile mode. Do you want to continue? [y/n]