linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vineet Gupta <vineet.gupta1@synopsys.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 2/2] ARC: show_regs: fix lockdep splat for good
Date: Fri, 21 Dec 2018 09:55:34 -0800	[thread overview]
Message-ID: <8b3739f1-a7d5-7253-362a-3a1c707b0f6d@synopsys.com> (raw)
In-Reply-To: <20181221130404.GF16107@dhcp22.suse.cz>

On 12/21/18 5:04 AM, Michal Hocko wrote:
>> I presume you are referring to original commit, not my anti-change in ARC code,
>> which is actually re-enabling it.
> 
> Yes, but you are building on a broken concept I believe.

Not sure where this is heading. Broken concept was introduced by disabling
preemption around show_regs() to silence x86 smp_processor_id() splat in 2009.

> What
> implications does re-enabling really have ? Now you could reschedule and> you can move to another CPU. Is this really safe?

>From initial testing, none so far. show_regs() is simply pretty printing the
passed pt_regs and decoding the current task, which agreed could move to a
different CPU (likely will due to console/printk calls), but I don't see how that
could mess up its mm or othe rinternal plumbing which it prints.


> I believe that yes
> because the preemption disabling is simply bogus. Which doesn't sound
> like a proper justification, does it?

[snip]

> I do not follow. If there is some path to require show_regs to run with
> preemption disabled while others don't then something is clearly wrong.

[snip]

> Yes, the fix might be more involved but I would much rather prefer a
> correct code which builds on solid assumptions.

Right so the first step is reverting the disabled semantics for ARC and do some
heavy testing to make sure any fallouts are addressed etc. And if that works, then
propagate this change to core itself. Low risk strategy IMO - agree ?

Thx,
-Vineet

WARNING: multiple messages have this Message-ID
From: Vineet Gupta <vineet.gupta1@synopsys.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 2/2] ARC: show_regs: fix lockdep splat for good
Date: Fri, 21 Dec 2018 09:55:34 -0800	[thread overview]
Message-ID: <8b3739f1-a7d5-7253-362a-3a1c707b0f6d@synopsys.com> (raw)
Message-ID: <20181221175534.RKFbjKmOPCwT0q3_THoW3DZMsGEzrGxSnk_NSaUJFzI@z> (raw)
In-Reply-To: <20181221130404.GF16107@dhcp22.suse.cz>

On 12/21/18 5:04 AM, Michal Hocko wrote:
>> I presume you are referring to original commit, not my anti-change in ARC code,
>> which is actually re-enabling it.
> 
> Yes, but you are building on a broken concept I believe.

Not sure where this is heading. Broken concept was introduced by disabling
preemption around show_regs() to silence x86 smp_processor_id() splat in 2009.

> What
> implications does re-enabling really have ? Now you could reschedule and> you can move to another CPU. Is this really safe?

From initial testing, none so far. show_regs() is simply pretty printing the
passed pt_regs and decoding the current task, which agreed could move to a
different CPU (likely will due to console/printk calls), but I don't see how that
could mess up its mm or othe rinternal plumbing which it prints.


> I believe that yes
> because the preemption disabling is simply bogus. Which doesn't sound
> like a proper justification, does it?

[snip]

> I do not follow. If there is some path to require show_regs to run with
> preemption disabled while others don't then something is clearly wrong.

[snip]

> Yes, the fix might be more involved but I would much rather prefer a
> correct code which builds on solid assumptions.

Right so the first step is reverting the disabled semantics for ARC and do some
heavy testing to make sure any fallouts are addressed etc. And if that works, then
propagate this change to core itself. Low risk strategy IMO - agree ?

Thx,
-Vineet



  parent reply	other threads:[~2018-12-21 17:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 18:53 [PATCH 0/2] ARC show_regs fixes Vineet Gupta
2018-12-18 18:53 ` [PATCH 1/2] ARC: show_regs: avoid page allocator Vineet Gupta
2018-12-19 17:04   ` Eugeniy Paltsev
2018-12-19 17:36     ` Vineet Gupta
2018-12-20  1:16     ` Vineet Gupta
2018-12-20 13:30       ` Tetsuo Handa
2018-12-20 18:36         ` Vineet Gupta
2018-12-20 18:43         ` Vineet Gupta
2018-12-19 20:46   ` William Kucharski
2018-12-19 21:36     ` Vineet Gupta
2018-12-20 12:57   ` Michal Hocko
2018-12-20 18:38     ` Vineet Gupta
2018-12-18 18:53 ` [PATCH 2/2] ARC: show_regs: fix lockdep splat for good Vineet Gupta
2018-12-20 13:04   ` Michal Hocko
2018-12-20 18:45     ` Vineet Gupta
2018-12-21 13:04       ` Michal Hocko
2018-12-21 13:27         ` Michal Hocko
2018-12-21 17:55         ` Vineet Gupta [this message]
2018-12-21 17:55           ` Vineet Gupta
2018-12-24 19:10           ` Michal Hocko

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=8b3739f1-a7d5-7253-362a-3a1c707b0f6d@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=mhocko@kernel.org \
    --cc=peterz@infradead.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