From: Li Zhong <zhong@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
paulmck@linux.vnet.ibm.com, benh@kernel.crashing.org,
paulus@samba.org
Subject: Re: [RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem
Date: Sat, 16 Feb 2013 17:41:19 +0800 [thread overview]
Message-ID: <1361007679.2580.10.camel@ThinkPad-T5421.cn.ibm.com> (raw)
In-Reply-To: <CAFTL4hzfXfCGDjwjW=Frcs5+jS_i3U_JHytNOEhEF5X7_Fw6Sg@mail.gmail.com>
On Sun, 2013-02-10 at 15:10 +0100, Frederic Weisbecker wrote:
> 2013/2/1 Li Zhong <zhong@linux.vnet.ibm.com>:
> > This is the exception hooks for context tracking subsystem, including
> > data access, program check, single step, instruction breakpoint, machine check,
> > alignment, fp unavailable, altivec assist, unknown exception, whose handlers
> > might use RCU.
> >
> > This patch corresponds to
> > [PATCH] x86: Exception hooks for userspace RCU extended QS
> > commit 6ba3c97a38803883c2eee489505796cb0a727122
> >
> > Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
>
> Looks good!
>
> I guess we should move exception_enter/exit definition to the generic
> code. They should be the same for all archs after all.
Indeed.
> Also we are
> relying on user_mode(regs) but this may be buggy with some corner
> cases. For example if an exception happen after a call to user_exit()
I guess you mean user_enter() here, or am I confused?
> (on syscall exit) but before we actually resume in userspace, the
> exception will exit in kernel mode from the context tracking POV.
>
> So instead on relying on the regs, which are not sync with the context
> tracking state, we should use something like:
>
> prev_state = exception_enter();
> ...
> exception_exit(prev_state);
>
> Also preempt_schedule_irq() is concerned as well by this problem. So I
> should convert it to that scheme as well. I'm going to prepare some
> patches.
>
> Feel free to merge this patch in the powerpc tree, I'll do the
> conversion along the way.
Or if your patches gets merged earlier than these, I can update my code
according to yours.
Thanks, Zhong
>
> Thanks.
>
next prev parent reply other threads:[~2013-02-16 9:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-01 10:27 [RFC PATCH 0/5] powerpc: Support context tracking for Power pSeries Li Zhong
2013-02-01 10:27 ` [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem Li Zhong
2013-02-07 0:29 ` Frederic Weisbecker
2013-02-07 8:53 ` Li Zhong
2013-02-07 16:09 ` Frederic Weisbecker
2013-02-10 10:32 ` Frederic Weisbecker
2013-02-01 10:27 ` [RFC PATCH 2/5] powerpc: Exception " Li Zhong
2013-02-10 14:10 ` Frederic Weisbecker
2013-02-16 9:41 ` Li Zhong [this message]
2013-02-01 10:27 ` [RFC PATCH 3/5] powerpc: Exit user context on notify resume Li Zhong
2013-02-01 10:27 ` [RFC PATCH 4/5] powerpc: Use the new schedule_user API on userspace preemption Li Zhong
2013-02-01 10:27 ` [RFC PATCH 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries Li Zhong
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=1361007679.2580.10.camel@ThinkPad-T5421.cn.ibm.com \
--to=zhong@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulmck@linux.vnet.ibm.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
all inboxes | Powered by JetHome®