linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Laurent Dufour <ldufour@linux.ibm.com>,
	benh@kernel.crashing.org, paulus@samba.org,
	aneesh.kumar@linux.ibm.com, npiggin@gmail.com,
	linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/2] powerpc/mm: Conditionally call H_BLOCK_REMOVE
Date: Wed, 18 Sep 2019 23:41:54 +1000	[thread overview]
Message-ID: <871rwdwwkd.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20190916095543.17496-1-ldufour@linux.ibm.com>

Hi Laurent,

Thanks for fixing this, just a few comments.

Laurent Dufour <ldufour@linux.ibm.com> writes:
> Since the commit ba2dd8a26baa ("powerpc/pseries/mm: call H_BLOCK_REMOVE"),
> the call to H_BLOCK_REMOVE is always done if the feature is exhibited.
>
> However, the hypervisor may not support all the block size for the hcall
> H_BLOCK_REMOVE depending on the segment base page size and actual page
> size.
>
> When unsupported block size is used, the hcall H_BLOCK_REMOVE is returning
> H_PARAM, which is triggering a BUG_ON check leading to a panic like this:

Missing panic :)

Also can you put that detail in the 2nd commit, so that it's obvious
that it is a fix for an oops.

> The PAPR document specifies the TLB Block Invalidate Characteristics which

Can you give a section/page number for the PAPR reference.

> tells for each couple segment base page size, actual page size, the size of
                 ^
                 "pair of" is better than "couple" I think

> the block the hcall H_BLOCK_REMOVE is supporting.
>
> Supporting various block sizes doesn't seem needed at that time since all
> systems I was able to play with was supporting an 8 addresses block size,
> which is the maximum through the hcall, or none at all. Supporting various
> size would complexify the algorithm in call_block_remove() so unless this
> is required, this is not done.
>
> In the case of block size different from 8, a warning message is displayed
> at boot time and that block size will be ignored checking for the
> H_BLOCK_REMOVE support.
>
> Due to the minimal amount of hardware showing a limited set of
> H_BLOCK_REMOVE supported page size, I don't think there is a need to push
> this series to the stable mailing list.

But the hardware that is exhibiting it, by crashing and not booting, is
mostly (all?) older hardware. So I think we probably should send it back
to stable, otherwise those machines may never get an updated kernel.

Can you add Fixes: tags to the commits, they should point at the commit
that added H_BLOCK_REMOVE support.

cheers

> The first patch is reading the characteristic through the hcall
> ibm,get-system-parameter and record the supported block size for each page
> size.  The second patch is changing the check used to detect the
> H_BLOCK_REMOVE availability to take care of the base page size and page
> size couple.
>
> Changes since V1:
>
>  - Remove penc initialisation, this is already done in
>    mmu_psize_set_default_penc()
>  - Add details on the TLB Block Invalidate Characteristics's buffer format
>  - Introduce #define instead of using direct numerical values
>  - Function reading the characteristics is now directly called from
>    pSeries_setup_arch()
>  - The characteristics are now stored in a dedciated table static to lpar.c
>
> Laurent Dufour (2):
>   powperc/mm: read TLB Block Invalidate Characteristics
>   powerpc/mm: call H_BLOCK_REMOVE when supported
>
>  .../include/asm/book3s/64/tlbflush-hash.h     |   1 +
>  arch/powerpc/platforms/pseries/lpar.c         | 173 +++++++++++++++++-
>  arch/powerpc/platforms/pseries/setup.c        |   1 +
>  3 files changed, 173 insertions(+), 2 deletions(-)
>
> -- 
> 2.23.0

      parent reply	other threads:[~2019-09-18 13:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  9:55 [PATCH v2 0/2] powerpc/mm: Conditionally call H_BLOCK_REMOVE Laurent Dufour
2019-09-16  9:55 ` [PATCH v2 1/2] powperc/mm: read TLB Block Invalidate Characteristics Laurent Dufour
2019-09-18 13:42   ` Michael Ellerman
2019-09-19 15:59     ` Laurent Dufour
2019-09-16  9:55 ` [PATCH v2 2/2] powerpc/mm: call H_BLOCK_REMOVE when supported Laurent Dufour
2019-09-18 13:42   ` Michael Ellerman
2019-09-19 15:17     ` Laurent Dufour
2019-09-17 16:12 ` [PATCH v2 0/2] powerpc/mm: Conditionally call H_BLOCK_REMOVE Aneesh Kumar K.V
2019-09-18 13:41 ` Michael Ellerman [this message]

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=871rwdwwkd.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    /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).