public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: WANG Chao <chaowang@redhat.com>
Cc: Muli Ben-Yehuda <muli@cs.technion.ac.il>,
	"Jon D. Mason" <jdmason@kudzu.us>,
	"H. Peter Anvin" <hpa@zytor.com>, Baoquan He <bhe@redhat.com>,
	kexec@lists.infradead.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, calgary: use 8M TCE table size by default
Date: Mon, 10 Mar 2014 08:38:49 -0400	[thread overview]
Message-ID: <20140310123848.GA31879@redhat.com> (raw)
In-Reply-To: <20140310083834.GA32547@dhcp-17-89.nay.redhat.com>

On Mon, Mar 10, 2014 at 04:38:34PM +0800, WANG Chao wrote:

[..]
> > So we have two scenarios.
> > 
> > - Old first kernel and new second kernel.
> > - New first kernel and old second kernel.
> > 
> > If we want to make these two scenarios work with calgary, we need to
> > use kexec-tools with --pass-memmap option. And also in new kernel we
> > need to retain saved_max_pfn. Only difference will be, that we will
> > set saved_max_pfn only if it is kdump kernel and if user passed a 
> > memory map on kernel command line.
> 
> Old first kernel and new second kernel is easy to handle. Like you said,
> we can use exactmap and set saved_max_pfn in kdump kernel, just as the
> old way.
> 
> But it's still not clear to me how we can handle the case of new first
> kernel and old second kernel.
> 
> Let's say, a calgary system has 2G memory. The new first kernel TCE
> table size are hard coded to 8M. When the old kdump kernel is booting,
> memmap=exactmap is parsed and saved_max_pfn is set to 2G/PAGE_SIZE. TCE
> table size is determined by 2G ram size. So the size is 4M. We run into
> the situation that TCE table is 8M in first kernel and 4M in second
> kernel. This inconsistency of TCE table size would cause kdump kernel
> fails somehow, that's why we brought in saved_max_pfn in the first place
> as you know.
> 
> The problem is how to keep TCE table size being consistent between new
> first kernel and old second kernel.

You are right. I did not think through it. So we can't handle the case
of new first kernel and second old kernel without exporting size of
tables to user space. Given the fact that calgary is old hardware,
exporting table size to user space is not very prudent.

I would say let us handle the case of old first kernel and second new
kernel to maintain backward compatibility.

Thanks
Vivek

      reply	other threads:[~2014-03-10 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  8:10 [PATCH] x86, calgary: use 8M TCE table size by default WANG Chao
2014-03-07 14:14 ` Vivek Goyal
2014-03-07 15:52   ` WANG Chao
2014-03-07 16:09     ` Vivek Goyal
2014-03-09  7:08       ` Muli Ben-Yehuda
2014-03-10  8:38       ` WANG Chao
2014-03-10 12:38         ` Vivek Goyal [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=20140310123848.GA31879@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=bhe@redhat.com \
    --cc=chaowang@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jdmason@kudzu.us \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muli@cs.technion.ac.il \
    --cc=x86@kernel.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