All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: mingo@kernel.org, dedekind1@gmail.com,
	linux-kernel@vger.kernel.org, mgorman@suse.de,
	rostedt@goodmis.org, juri.lelli@arm.com
Subject: Re: [RFC][PATCH 4/4] sched, numa: Ignore pinned tasks
Date: Mon, 18 May 2015 10:13:35 -0400	[thread overview]
Message-ID: <5559F38F.8010908@redhat.com> (raw)
In-Reply-To: <1431954418.3322.3.camel@twins>

On 05/18/2015 09:06 AM, Peter Zijlstra wrote:
> On Mon, 2015-05-18 at 18:30 +0530, Srikar Dronamraju wrote:
>>>  
>>>  static void account_numa_dequeue(struct rq *rq, struct task_struct *p)
>>>  {
>>> +	if (p->nr_cpus_allowed == 1) {
>>> +		rq->nr_pinned_running--;
>>> +		WARN_ON_ONCE(p->numa_preferred_nid != -1);
>>> +	}
>>>  	rq->nr_numa_running -= (p->numa_preferred_nid != -1);
>>>  	rq->nr_preferred_running -= (p->numa_preferred_nid == task_node(p));
>>>  }
>>
>>
>> Shouldnt we reset p->numa_preferred_nid when we are setting the allowed
>> cpus in set_cpus_allowed_common()? 
>>
>> Otherwise if an process is set a preferred node based on its numa faults
>> but then is pinned to a different cpu, then we can see this warning.:w!
> 
> We should never get preferred_nid set when nr_cpus_allowed == 1, see the
> hunk that changes task_tick_numa.
> 
> So we set preferred = -1 on pinning, do not partake in numa balancing
> while this is so, therefore it should still be so when we dequeue,
> right?

It could be pinned after it has been running for a while,
with taskset -c <cpu> -p <pid>

-- 
All rights reversed

  reply	other threads:[~2015-05-18 14:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 15:43 [RFC][PATCH 0/4] sched,numa: pinned task accounting Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 1/4] sched: Fix a race between __kthread_bind() and sched_setaffinity() Peter Zijlstra
2015-05-15 15:56   ` Tejun Heo
2015-08-07 14:27     ` Peter Zijlstra
2015-08-07 15:16       ` Tejun Heo
2015-08-07 15:29         ` Peter Zijlstra
2015-08-07 15:38           ` Tejun Heo
2015-08-07 15:59             ` Peter Zijlstra
2015-08-07 16:09               ` Tejun Heo
2015-08-12 12:38   ` [tip:sched/core] " tip-bot for Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 2/4] sched: Make sched_class::set_cpus_allowed() unconditional Peter Zijlstra
2015-08-12 12:38   ` [tip:sched/core] " tip-bot for Peter Zijlstra
2015-08-20 16:45   ` [RFC][PATCH 2/4] " Sasha Levin
2015-05-15 15:43 ` [RFC][PATCH 3/4] sched: Change sched_class::set_cpus_allowed calling context Peter Zijlstra
     [not found]   ` <OF66BF3765.2EBFD3B1-ON48257E49.0028DC79-48257E49.0029F058@zte.com.cn>
2015-05-18  8:32     ` Peter Zijlstra
2015-05-18  9:34       ` Juri Lelli
2015-05-18 20:04       ` Peter Zijlstra
2015-08-12 12:38   ` [tip:sched/core] sched: Change the sched_class::set_cpus_allowed( ) " tip-bot for Peter Zijlstra
2015-08-13 18:47     ` Sasha Levin
2015-08-13 20:37       ` Peter Zijlstra
2015-08-13 20:59         ` Sasha Levin
2015-08-13 21:30           ` Peter Zijlstra
2015-05-15 15:43 ` [RFC][PATCH 4/4] sched, numa: Ignore pinned tasks Peter Zijlstra
2015-05-15 19:05   ` Rik van Riel
2015-05-16  9:31   ` Peter Zijlstra
2015-05-18 13:00   ` Srikar Dronamraju
2015-05-18 13:06     ` Peter Zijlstra
2015-05-18 14:13       ` Rik van Riel [this message]
2015-05-18 14:29       ` Srikar Dronamraju
2015-05-18 15:09         ` Peter Zijlstra
2015-05-18 13:10   ` Srikar Dronamraju
2015-05-18  9:08 ` [RFC][PATCH 0/4] sched,numa: pinned task accounting Artem Bityutskiy

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=5559F38F.8010908@redhat.com \
    --to=riel@redhat.com \
    --cc=dedekind1@gmail.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.