linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <nathanl@linux.ibm.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 1/3] powerpc/vphn: Check for error from hcall_vphn
Date: Thu, 22 Aug 2019 11:41:13 -0500	[thread overview]
Message-ID: <87imqprw46.fsf@linux.ibm.com> (raw)
In-Reply-To: <20190822144235.19398-2-srikar@linux.vnet.ibm.com>

Hi Srikar,

Srikar Dronamraju <srikar@linux.vnet.ibm.com> writes:
> There is no point in unpacking associativity, if
> H_HOME_NODE_ASSOCIATIVITY hcall has returned an error.
>
> Also added error messages for H_PARAMETER and default case in
> vphn_get_associativity.

These are two logical changes and should be separated IMO.


> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index 50d68d2..88b5157 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -1191,6 +1191,10 @@ static long vphn_get_associativity(unsigned long cpu,
>  				VPHN_FLAG_VCPU, associativity);
>  
>  	switch (rc) {
> +	case H_SUCCESS:
> +		dbg("VPHN hcall succeeded. Reset polling...\n");
> +		timed_topology_update(0);
> +		break;
>  	case H_FUNCTION:
>  		printk_once(KERN_INFO
>  			"VPHN is not supported. Disabling polling...\n");
> @@ -1202,9 +1206,15 @@ static long vphn_get_associativity(unsigned long cpu,
>  			"preventing VPHN. Disabling polling...\n");
>  		stop_topology_update();
>  		break;
> -	case H_SUCCESS:
> -		dbg("VPHN hcall succeeded. Reset polling...\n");
> -		timed_topology_update(0);
> +	case H_PARAMETER:
> +		printk(KERN_ERR
> +			"hcall_vphn() was passed an invalid parameter."
> +			"Disabling polling...\n");

This will come out as:

hcall_vphn() was passed an invalid parameter.Disabling polling...
                                             ^

And it's misleading to say VPHN polling is being disabled when this case
does not invoke stop_topology_update().

> +		break;
> +	default:
> +		printk(KERN_ERR
> +			"hcall_vphn() returned %ld. Disabling polling \n", rc);
> +		stop_topology_update();
>  		break;

Any added prints in this routine must be _once or _ratelimited to avoid
log floods. Also use the pr_ APIs instead of printk please.

  reply	other threads:[~2019-08-22 16:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 14:42 [PATCH 0/3] Early node associativity Srikar Dronamraju
2019-08-22 14:42 ` [PATCH 1/3] powerpc/vphn: Check for error from hcall_vphn Srikar Dronamraju
2019-08-22 16:41   ` Nathan Lynch [this message]
2019-08-22 14:42 ` [PATCH 2/3] powerpc/numa: Early request for home node associativity Srikar Dronamraju
2019-08-22 17:17   ` Nathan Lynch
2019-08-22 17:40     ` Srikar Dronamraju
2019-08-22 18:33       ` Nathan Lynch
2019-08-23  7:16   ` Satheesh Rajendran
2019-08-27  6:57     ` Srikar Dronamraju
2019-08-22 14:42 ` [PATCH 3/3] powerpc/numa: Remove late " Srikar Dronamraju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imqprw46.fsf@linux.ibm.com \
    --to=nathanl@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=srikar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).