From: Olof Johansson <olof@lixom.net>
To: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH 1/1 v2 ] Add kernel parameter to disable batched hcalls
Date: Tue, 28 Sep 2010 12:52:06 -0500 [thread overview]
Message-ID: <20100928175206.GA15783@lixom.net> (raw)
In-Reply-To: <1285693371.2843.43.camel@lexx>
Nice. I've got minor nits below, and you might also want to run the patch
through checkpatch and fix up some of the whitespace warnings.
-Olof
On Tue, Sep 28, 2010 at 12:02:51PM -0500, Will Schmidt wrote:
>
> This introduces a pair of kernel parameters that can be used to disable
> the MULTITCE and BULK_REMOVE h-calls.
>
> By default, those hcalls are enabled, active, and good for throughput
> and performance. The ability to disable them will be useful for some of
> the PREEMPT_RT related investigation and work occurring on Power.
>
>
> Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> cc: Olof Johansson <olof@lixom.net>
> cc: Anton Blanchard <anton@samba.org>
> cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> ---
>
> v2 - Per feedback from Olof, the code is reworked to utilize kernel
> parameter runtime checks, rather than CONFIG options.
> - Added relevant change to kernel-parameters.txt
>
>
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index e2c7487..5c40801 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -426,6 +426,10 @@ and is between 256 and 4096 characters. It is defined in the file
> bttv.pll= See Documentation/video4linux/bttv/Insmod-options
> bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
>
> + bulk_remove=off [PPC] This parameter disables the use of the pSeries
> + firmware feature for flushing multiple hpte entries
> + at a time.
> +
> BusLogic= [HW,SCSI]
> See drivers/scsi/BusLogic.c, comment before function
> BusLogic_ParseDriverOptions().
> @@ -1499,6 +1503,10 @@ and is between 256 and 4096 characters. It is defined in the file
> mtdparts= [MTD]
> See drivers/mtd/cmdlinepart.c.
>
> + multitce=off [PPC] This parameter disables the use of the pSeries
> + firmware feature for updating multiple TCE entries
> + at a time.
> +
> onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration
>
> Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock]
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index 902987d..e174a2f 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -625,3 +625,19 @@ void iommu_init_early_pSeries(void)
> set_pci_dma_ops(&dma_iommu_ops);
> }
>
> +static int __init disable_multitce(char *str)
> +{
> + if (strcmp(str,"off")==0) {
> + if (firmware_has_feature(FW_FEATURE_LPAR)) {
> + if (firmware_has_feature(FW_FEATURE_MULTITCE)) {
> + printk(KERN_INFO "Disabling MULTITCE firmware feature\n");
> + ppc_md.tce_build = tce_build_pSeriesLP;
> + ppc_md.tce_free = tce_free_pSeriesLP;
> + powerpc_firmware_features &= ~FW_FEATURE_MULTITCE;
> + }
> + }
> + }
I personally prefer to keep cases like these in one if statement to save indentation:
if (strcmp(str, "off") == 0 &&
firmware_has_feature(FW_FEATURE_LPAR) &&
firmware_has_feature(FW_FEATURE_MULTITCE)) {
<...>
}
> + return 1;
> +}
> +
> +__setup("multitce=",disable_multitce);
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index 0707653..82d15e7 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -599,6 +599,19 @@ static void pSeries_lpar_flush_hash_range(unsigned long number, int local)
> spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
> }
>
> +static int __init disable_bulk_remove(char *str)
> +{
> + if (strcmp(str,"off")==0) {
> + if (firmware_has_feature(FW_FEATURE_BULK_REMOVE)) {
> + printk(KERN_INFO "Disabling BULK_REMOVE firmware feature");
> + powerpc_firmware_features &= ~FW_FEATURE_BULK_REMOVE;
> + }
> + }
Same here.
> + return 1;
> +}
> +
> +__setup("bulk_remove=",disable_bulk_remove);
> +
> void __init hpte_init_lpar(void)
> {
> ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate;
>
next prev parent reply other threads:[~2010-09-28 17:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 21:44 [PATCH 1/1] Add config option for batched hcalls Will Schmidt
2010-09-26 3:49 ` Olof Johansson
2010-09-27 20:06 ` Will Schmidt
2010-09-28 17:02 ` [PATCH 1/1 v2 ] Add kernel parameter to disable " Will Schmidt
2010-09-28 17:52 ` Olof Johansson [this message]
2010-09-29 1:33 ` [PATCH 1/1 v3] " Will Schmidt
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=20100928175206.GA15783@lixom.net \
--to=olof@lixom.net \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=will_schmidt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.