On Mon, May 11, 2020 at 05:50:01PM -0700, Luck, Tony wrote:
On Tue, May 12, 2020 at 12:19:25AM +0300, Andy Shevchenko wrote:
On Mon, May 11, 2020 at 06:58:21PM +0000, Luck, Tony wrote:
pr_err("%lldMB of physical memory is not addressable in the paging mode\n",
not_addressable >> 20);
Is "MB" the right unit for this. The problem seems to happen for systems with >64TB ... I doubt the unaddressable memory is just a couple of MBbytes
Change it to GB?
I think it would be more readable.
[Maybe Linux needs a magic %p{something} that does auto-sizing to print in the most appropriate out of KB, MB, GB, TB, PB?]
We have one in string_helpers.c.
Ah, nice. So:
#include <linux/string_helpers.h>
char tmp[10]; /* Bother, no #define for this, just a comment in string_helpers.c */
string_get_size(not_addressable, 1, STRING_UNITS_2, tmp, sizeof(tmp);
pr_err("%s of physical memory is not addressable in the paging mode\n", tmp);
I've already submitted the patch upstream. I'll add it if a new revision is needed.