Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1622581

Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic'

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic'
Date 2017-04-13 00:00 +0200
Message-ID <tvysV-1QL-19@gated-at.bofh.it> (permalink)
References (1 earlier) <tvmBs-2Gr-11@gated-at.bofh.it> <tvwKu-Gu-11@gated-at.bofh.it> <tvx3P-QV-17@gated-at.bofh.it> <tvx3Q-QV-35@gated-at.bofh.it> <tvxQd-1uj-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 12 Apr 2017, Borislav Petkov wrote:

> On Wed, Apr 12, 2017 at 08:27:05PM +0000, Verma, Vishal L wrote:
> > But isn't the atomic notifier call chain always called in atomic
> > context?
> 
> No, it isn't. We're calling it in normal process context in
> mce_gen_pool_process() too.
> 
> So this early exit will avoid any sleeping in atomic context. And since
> there's nothing you can do about the errors reported in atomic context,
> we can actually use that fact.

No, you can't.

CONFIG_RCU_PREEMPT=n + CONFIG_PREEMPT_COUNT will disable preemption from
within __atomic_notifier_call_chain() via rcu_read_lock(). Ergo you wont
ever enter the handler.

The behaviour in the RCU code is inconsistent. CONFIG_RCU_PREEMPT=y does
obviouly not disable preemption, but it should still trigger the
might_sleep() check when a blocking function is called from within a rcu
read side critical section.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic' Vishal Verma <vishal.l.verma@intel.com> - 2017-04-12 00:50 +0200
  Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-12 11:20 +0200
    Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Vishal Verma <vishal.l.verma@intel.com> - 2017-04-12 22:10 +0200
      Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-12 22:30 +0200
        Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking'  from 'atomic' "Verma, Vishal L" <vishal.l.verma@intel.com> - 2017-04-12 22:30 +0200
          Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic' Dan Williams <dan.j.williams@intel.com> - 2017-04-12 23:00 +0200
            Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Thomas Gleixner <tglx@linutronix.de> - 2017-04-12 23:20 +0200
              Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Luck, Tony" <tony.luck@intel.com> - 2017-04-12 23:20 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-12 23:50 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-13 00:20 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Luck, Tony" <tony.luck@intel.com> - 2017-04-13 00:30 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-13 00:30 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-13 13:40 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-13 14:20 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Luck, Tony" <tony.luck@intel.com> - 2017-04-18 18:30 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking'  from 'atomic' "Verma, Vishal L" <vishal.l.verma@intel.com> - 2017-04-21 23:50 +0200
          Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Luck, Tony" <tony.luck@intel.com> - 2017-04-12 23:00 +0200
          Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Borislav Petkov <bp@suse.de> - 2017-04-12 23:20 +0200
            Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' Thomas Gleixner <tglx@linutronix.de> - 2017-04-13 00:00 +0200
              Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 00:50 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 01:50 +0200
                Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from  'atomic' "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-13 16:40 +0200
  [tip:ras/urgent] x86/mce: Make the MCE notifier a blocking one tip-bot for Vishal Verma <tipbot@zytor.com> - 2017-04-18 22:30 +0200

csiph-web