public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [RFC patch] use thread.on_ustack to determine if on user stack
Date: Fri, 12 Oct 2007 22:15:06 +0000	[thread overview]
Message-ID: <20071012221506.GA7194@linux-os.sc.intel.com> (raw)
In-Reply-To: <3877989d0709290053s7b4e80b6t9e7127b9ccac522b@mail.gmail.com>

On 9/29/07, Luming Yu <luming.yu@gmail.com> wrote:
>Hello list,

>The PSR.lp bit of kernel thread kondemand sometimes would be set, then
>causes set_pstate PAL call fails with invalid argument. I tracked down
>to the place that the PSR.lp was set in do_notify_resume_user. I don't
>understand why not use task->thread.on_ustack to
>check if on user stack.in the first place. For optimization?

The reason for not using on_ustack is because stack in fsys is a mixture of
kernel states and user states. on_ustack is not a correct way to reflect fsys
stack usage. It's cleared to 0 during fsys which can not be explained as it's
not user stack.

The current implementation of checking user_stack() is correct. Though it would
be better to change user_stack()'s name to something like fsys_stack() to avoid
future confusion.

The patch actually always makes user_stack()=0 and fsys_mode()=0 during fsys
execution. Thus there is no psr.lp=1 during fsys execution. And signal is always
delivered during fsys execution.This masks the "Transition failure" issue
instead of fixing it. The patch might cause issues in some stress tests.

Could you please provide more debug info on the issue?

Thanks.

-Fenghua

  reply	other threads:[~2007-10-12 22:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29  7:53 [RFC patch] use thread.on_ustack to determine if on user stack Luming Yu
2007-10-12 22:15 ` Fenghua Yu [this message]
2007-10-15  4:28 ` Luming Yu
2007-10-15 23:26 ` Fenghua Yu
2007-10-16  1:14 ` Luming Yu

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=20071012221506.GA7194@linux-os.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=linux-ia64@vger.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