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

Re: [PATCH v2] mm: Unify PRI_gfn and PRI_mfn macros



On Mon, Sep 9, 2024 at 2:21 PM Jan Beulich <jbeulich@xxxxxxxx> wrote:
On 09.09.2024 15:14, Frediano Ziglio wrote:
> @@ -4334,7 +4334,7 @@ static void gnttab_usage_print(struct domain *rd)
>          first = 0;

>          /*      [0xXXX]  ddddd 0xXXXXX 0xXXXXXXXX      ddddd 0xXXXXXX 0xXX */
> -        printk("[0x%03x]  %5d 0x%"PRI_mfn" 0x%08x      %5d 0x%06"PRIx64" 0x%02x\n",
> +        printk("[0x%03x]  %5d %"PRI_mfn" 0x%08x      %5d 0x%06"PRIx64" 0x%02x\n",
>                 ref, act->domid, mfn_x(act->mfn), act->pin,
>                 sha->domid, frame, status);

Sadly this is where things break: The columnar view will no longer be retained
even on systems with memory only below 4Gb. I have to admit I'm not sure in how
far we can deem this acceptable.

Jan

I suppose this line is more the exception to the rule.
One option would be to define the macros to just take care of the type and base (like standards like PRIx64) and specify all in the strings (so having "%#"PRI_mfn or "0x%05"PRI_mfn).
Or define 2 macros, one for default format (I would go for PRI_mfn) and another for raw format (like PRIx_mfn).

Frediano
 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.