linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Peter Xu <peterx@redhat.com>, Juri Lelli <juri.lelli@redhat.com>
Subject: Re: [PATCH] sched/isolation: isolate from handling managed interrupt
Date: Fri, 17 Jan 2020 05:58:14 +0800	[thread overview]
Message-ID: <20200116215814.GA24827@ming.t460p> (raw)
In-Reply-To: <875zhbwqmm.fsf@nanos.tec.linutronix.de>

Hi Thomas,

On Thu, Jan 16, 2020 at 01:08:17PM +0100, Thomas Gleixner wrote:
> Ming,
> 
> Ming Lei <ming.lei@redhat.com> writes:
> 
> > @@ -212,12 +213,29 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
> >  {
> >  	struct irq_desc *desc = irq_data_to_desc(data);
> >  	struct irq_chip *chip = irq_data_get_irq_chip(data);
> > +	const struct cpumask *housekeeping_mask =
> > +		housekeeping_cpumask(HK_FLAG_MANAGED_IRQ);
> >  	int ret;
> > +	cpumask_var_t tmp_mask = (struct cpumask *)mask;
> >  
> >  	if (!chip || !chip->irq_set_affinity)
> >  		return -EINVAL;
> >  
> > -	ret = chip->irq_set_affinity(data, mask, force);
> > +	zalloc_cpumask_var(&tmp_mask, GFP_ATOMIC);
> 
> I clearly told you:
> 
>     "That's wrong. This code is called with interrupts disabled, so
>      GFP_KERNEL is wrong. And NO, we won't do a GFP_ATOMIC allocation
>      here."
> 
> Is that last sentence unclear in any way?

Yeah, it is clear.

But GFP_ATOMIC is usually allowed in atomic context, could you
explain it a bit why it can't be done in this case?

We still can fallback to current behavior if the allocation
fails.

Or could you suggest to solve the issue in other way if GFP_ATOMIC
can't be done?


Thanks,
Ming


  reply	other threads:[~2020-01-16 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  9:48 [PATCH] sched/isolation: isolate from handling managed interrupt Ming Lei
2020-01-16 12:08 ` Thomas Gleixner
2020-01-16 21:58   ` Ming Lei [this message]
2020-01-17  0:23     ` Thomas Gleixner
2020-01-17  1:51       ` Ming Lei
2020-01-17 20:52 ` kbuild test robot

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=20200116215814.GA24827@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).