Re: [linux-drivers-review] [PATCH] x86/mm: Fix boot with some memory above MAXMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
 Kirill A. Shutemov



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux