public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: "xiaoqiang.zhao" <zhaoxiaoqiang007@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: schdule bug in 4.4.38-rt49
Date: Fri, 5 Jul 2019 14:31:59 +0800	[thread overview]
Message-ID: <b9c00fd2-f190-05d6-fa7f-8091c69a4941@gmail.com> (raw)
In-Reply-To: <3d020904-95c2-9cb1-1560-c1a2c931ba83@gmail.com>


在 2019/7/4 下午6:17, xiaoqiang.zhao 写道:
> Resend as plain-text to linux-rt-users list.
>
> 在 2019/7/4 下午1:50, xiaoqiang.zhao 写道:
>
> 在 2019/7/3 下午7:42, Sebastian Andrzej Siewior 写道:
>> On 2019-06-26 15:35:04 [+0800], xiaoqiang.zhao wrote:
>>> Hi, guys:
>> Hi,
>>
> Thanks for your reply ;-)
>
>>> 2) -> __schedule_bug ( leads to kernel pagefault exception, OOPS!!)
>>>
>>> Before schedule, we have call preempt_disable twice, this will 
>>> definitely
>>> bump preempt_count to 2 and
>>
>> something probably disabled preemption before that
>
> I feel this is not make sense.  In my opinion, the preempt_count must 
> be zero before we call 'schedule()',
>
> otherwise, in_atomic_preempt_off will return true and trigger the 
> __schedule_bug. If we have already
>
> disable_preempt, we may in atomic context and we should not call 
> schedule, right ?
>
>>> in_atomic_preempt_off will fail.
>>>
>>> I did not figure out:   WHY we call schedule inside 
>>> rt_spin_lock_slowlock
>>> and under what condition this call is correct ?
>> if the lock is acquired you schedule out and wait und it is available
>> again.
> got this.
>
>
>>

Finally, this issue is resolved by revert commit 
80127a39681bd68c959f0953f84a830cbd7c3b1c <locking/percpu-rwsem: Optimize 
readers and reduce global impact>.  This commit introduce a 
"preempt_disable()" call in "percpu_up_read" function and  can NOT 
coexist with 4.4.38-rt49 preempt-rt patch set

Hope this information may be useful to someone who encounter the same 
problem ;-)

Thanks Sebastian !



      reply	other threads:[~2019-07-05  6:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26  7:35 schdule bug in 4.4.38-rt49 xiaoqiang.zhao
2019-07-03 11:42 ` Sebastian Andrzej Siewior
     [not found]   ` <987eec05-14d0-29a5-723c-7bfbc0a5465b@gmail.com>
2019-07-04  8:00     ` Sebastian Andrzej Siewior
2019-07-04 10:17     ` xiaoqiang.zhao
2019-07-05  6:31       ` xiaoqiang.zhao [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=b9c00fd2-f190-05d6-fa7f-8091c69a4941@gmail.com \
    --to=zhaoxiaoqiang007@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-rt-users@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