linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: anton@au1.ibm.com, paulus@samba.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH] powerpc/mm/thp: Make page table walk safe against thp split/collapse
Date: Tue, 24 Mar 2015 19:55:17 +1100	[thread overview]
Message-ID: <1427187317.4770.322.camel@kernel.crashing.org> (raw)
In-Reply-To: <87vbhrlz4i.fsf@linux.vnet.ibm.com>

On Tue, 2015-03-24 at 11:23 +0530, Aneesh Kumar K.V wrote:

> >>  	/* assume we don't have huge pages in vmalloc space... */
> >>  	addr = (pte_pfn(*p) << PAGE_SHIFT) | (addr & ~PAGE_MASK);
> >> +	local_irq_restore(flags);
> >>  	return __va(addr);
> >>  }
> >
> > This is called in real mode, I don't like the debug stuff that can
> > happen inside local_irq_* in that context. Can you either pounce that
> > to the higher level callers (and so not do it in real mode at all) or
> > use a lower level variant ? (I prefer going for the callers).
> >
> 
> Which debug stuff ? the dump_stack print in
> find_linux_pte_or_hugepte ?.

No, local_save/irq_restore

>  One of the reason I endup using pr_info and
> not WARN_ON is that the later didn't work in real mode. Or are you
> suggesting that we don't need to track for irqs_disabled for real-mode ?
> I was not sure whether we avoid taking an IPI when we are in real mode. 

We take no interrupts in real mode (we run with EE off). Just pounce the
local_irq_save/restore to the upper level callers in the handful of virt
mode cases where we call into these functions.

Cheers,
Ben.

      reply	other threads:[~2015-03-24  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 15:00 [RFC PATCH] powerpc/mm/thp: Make page table walk safe against thp split/collapse Aneesh Kumar K.V
2015-03-23 23:36 ` Benjamin Herrenschmidt
2015-03-24  5:53   ` Aneesh Kumar K.V
2015-03-24  8:55     ` Benjamin Herrenschmidt [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=1427187317.4770.322.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anton@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --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).