All of lore.kernel.org
 help / color / mirror / Atom feed
From: olof@lixom.net (Olof Johansson)
To: Mohan Kumar M <mohan@in.ibm.com>
Cc: Milton Miller II <miltonm@us.ibm.com>,
	kexec@lists.infradead.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>,
	sachinp@in.ibm.com, ellerman@au1.ibm.com
Subject: Re: [Patch 2/2] Kexec/Kdump support - POWER6
Date: Thu, 24 May 2007 09:21:33 -0500	[thread overview]
Message-ID: <20070524142133.GA13191@lixom.net> (raw)
In-Reply-To: <20070524121751.GB4547@in.ibm.com>

On Thu, May 24, 2007 at 05:47:51PM +0530, Mohan Kumar M wrote:
> On Wed, May 23, 2007 at 08:55:00PM +1000, Paul Mackerras wrote:
> > Sachin P. Sant writes:
> > 
> > > On Power machines supporting VRMA, Kexec/Kdump does not work.
> > > Hypervisor stores VRMA mapping used by the OS, in the hpte hash
> > > tables. Make sure these hpte entries are left untouched.
> > 
> > Surely all we need to do is to avoid clearing the VRMA entries.  We
> > can do this by not clearing any HPTE where the top 40 bits of the
> > first dword are 0x4001ffffff (B=1 for a 1TB segment and the
> > 0x0001ffffff special VSID).  In fact we can avoid having to read each
> > entry by doing the H_REMOVEs with H_ANDCOND and the bolted bit when we
> > clear the hash table, and only reading the HPTEs for which the
> > H_REMOVE returns an error.
> 
> So I tried 0x4000000000000000 as AVPN parameter and using that it
> removes all hpte entries other than VRMA(ie non 1TB segment size PTE
> entries).
> 
> Tested on POWER6/POWER5 machines.

Hi,

As Paul says above, you need to check for failures and compare the VSID
and possibly unhash it anyway in case of non-match. Otherwise if the
kernel ever starts using 1TB segments for regular use, those pages will
never be unhashed. I don't see your code doing that now.


-Olof


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: olof@lixom.net (Olof Johansson)
To: Mohan Kumar M <mohan@in.ibm.com>
Cc: Milton Miller II <miltonm@us.ibm.com>,
	kexec@lists.infradead.org, linuxppc-dev@ozlabs.org,
	Paul Mackerras <paulus@samba.org>,
	ellerman@au1.ibm.com
Subject: Re: [Patch 2/2] Kexec/Kdump support - POWER6
Date: Thu, 24 May 2007 09:21:33 -0500	[thread overview]
Message-ID: <20070524142133.GA13191@lixom.net> (raw)
In-Reply-To: <20070524121751.GB4547@in.ibm.com>

On Thu, May 24, 2007 at 05:47:51PM +0530, Mohan Kumar M wrote:
> On Wed, May 23, 2007 at 08:55:00PM +1000, Paul Mackerras wrote:
> > Sachin P. Sant writes:
> > 
> > > On Power machines supporting VRMA, Kexec/Kdump does not work.
> > > Hypervisor stores VRMA mapping used by the OS, in the hpte hash
> > > tables. Make sure these hpte entries are left untouched.
> > 
> > Surely all we need to do is to avoid clearing the VRMA entries.  We
> > can do this by not clearing any HPTE where the top 40 bits of the
> > first dword are 0x4001ffffff (B=1 for a 1TB segment and the
> > 0x0001ffffff special VSID).  In fact we can avoid having to read each
> > entry by doing the H_REMOVEs with H_ANDCOND and the bolted bit when we
> > clear the hash table, and only reading the HPTEs for which the
> > H_REMOVE returns an error.
> 
> So I tried 0x4000000000000000 as AVPN parameter and using that it
> removes all hpte entries other than VRMA(ie non 1TB segment size PTE
> entries).
> 
> Tested on POWER6/POWER5 machines.

Hi,

As Paul says above, you need to check for failures and compare the VSID
and possibly unhash it anyway in case of non-match. Otherwise if the
kernel ever starts using 1TB segments for regular use, those pages will
never be unhashed. I don't see your code doing that now.


-Olof

  reply	other threads:[~2007-05-24 14:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 12:22 [Patch 0/2] Kexec/Kdump support POWER6 Sachin P. Sant
2007-05-22 12:24 ` [Patch 1/2] " Sachin P. Sant
2007-05-22 12:26   ` [Patch 2/2] " Sachin P. Sant
2007-05-22 15:34     ` Olof Johansson
2007-05-23  5:13       ` Sachin P. Sant
2007-05-23  5:14       ` Sachin P. Sant
2007-05-23  9:37       ` [Patch 2/2] Kexec/Kdump support - POWER6 Sachin P. Sant
2007-05-23 10:55         ` Paul Mackerras
2007-05-24 12:17           ` Mohan Kumar M
2007-05-24 12:17             ` Mohan Kumar M
2007-05-24 14:21             ` Olof Johansson [this message]
2007-05-24 14:21               ` Olof Johansson
2007-05-25  8:55               ` [Patch ] " Sachin P. Sant
2007-05-25  8:55                 ` Sachin P. Sant
2007-05-25 22:43                 ` Benjamin Herrenschmidt
2007-05-25 22:43                   ` Benjamin Herrenschmidt
2007-05-28 11:40                   ` Sachin P. Sant
2007-05-28 11:40                     ` Sachin P. Sant
2007-05-28 21:31                     ` Benjamin Herrenschmidt
2007-05-28 21:31                       ` Benjamin Herrenschmidt
2007-05-29  6:18                       ` Sachin P. Sant
2007-05-29  6:18                         ` Sachin P. Sant
2007-05-29  6:58                         ` Benjamin Herrenschmidt
2007-05-29  6:58                           ` Benjamin Herrenschmidt
2007-05-29 10:14                     ` Michael Ellerman
2007-05-29 10:14                       ` Michael Ellerman
2007-05-29 11:06                       ` Stephen Rothwell
2007-05-29 11:06                         ` Stephen Rothwell

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=20070524142133.GA13191@lixom.net \
    --to=olof@lixom.net \
    --cc=ellerman@au1.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@us.ibm.com \
    --cc=mohan@in.ibm.com \
    --cc=paulus@samba.org \
    --cc=sachinp@in.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.