From: Chris Metcalf <cmetcalf@tilera.com>
To: Michal Hocko <mhocko@suse.cz>, Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
Mel Gorman <mgorman@suse.de>, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@gentwo.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>, Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Khalid Aziz <khalid.aziz@oracle.com>,
linux-mm@kvack.org, Gilad Ben-Yossef <gilad@benyossef.com>
Subject: Re: [PATCH] swap: remove the struct cpumask has_work
Date: Thu, 31 Jul 2014 12:09:19 -0400 [thread overview]
Message-ID: <53DA6A2F.100@tilera.com> (raw)
In-Reply-To: <20140731115137.GA20244@dhcp22.suse.cz>
On 7/31/2014 7:51 AM, Michal Hocko wrote:
> On Thu 31-07-14 11:30:19, Lai Jiangshan wrote:
>> It is suggested that cpumask_var_t and alloc_cpumask_var() should be used
>> instead of struct cpumask. But I don't want to add this complicity nor
>> leave this unwelcome "static struct cpumask has_work;", so I just remove
>> it and use flush_work() to perform on all online drain_work. flush_work()
>> performs very quickly on initialized but unused work item, thus we don't
>> need the struct cpumask has_work for performance.
> Why? Just because there is general recommendation for using
> cpumask_var_t rather than cpumask?
>
> In this particular case cpumask shouldn't matter much as it is static.
> Your code will work as well, but I do not see any strong reason to
> change it just to get rid of cpumask which is not on stack.
The code uses for_each_cpu with a cpumask to avoid waking cpus that don't
need to do work. This is important for the nohz_full type functionality,
power efficiency, etc. So, nack for this change.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Chris Metcalf <cmetcalf@tilera.com>
To: Michal Hocko <mhocko@suse.cz>, Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: <linux-kernel@vger.kernel.org>, <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@gentwo.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>, Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Khalid Aziz <khalid.aziz@oracle.com>, <linux-mm@kvack.org>,
Gilad Ben-Yossef <gilad@benyossef.com>
Subject: Re: [PATCH] swap: remove the struct cpumask has_work
Date: Thu, 31 Jul 2014 12:09:19 -0400 [thread overview]
Message-ID: <53DA6A2F.100@tilera.com> (raw)
In-Reply-To: <20140731115137.GA20244@dhcp22.suse.cz>
On 7/31/2014 7:51 AM, Michal Hocko wrote:
> On Thu 31-07-14 11:30:19, Lai Jiangshan wrote:
>> It is suggested that cpumask_var_t and alloc_cpumask_var() should be used
>> instead of struct cpumask. But I don't want to add this complicity nor
>> leave this unwelcome "static struct cpumask has_work;", so I just remove
>> it and use flush_work() to perform on all online drain_work. flush_work()
>> performs very quickly on initialized but unused work item, thus we don't
>> need the struct cpumask has_work for performance.
> Why? Just because there is general recommendation for using
> cpumask_var_t rather than cpumask?
>
> In this particular case cpumask shouldn't matter much as it is static.
> Your code will work as well, but I do not see any strong reason to
> change it just to get rid of cpumask which is not on stack.
The code uses for_each_cpu with a cpumask to avoid waking cpus that don't
need to do work. This is important for the nohz_full type functionality,
power efficiency, etc. So, nack for this change.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
next prev parent reply other threads:[~2014-07-31 16:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 3:30 [PATCH] swap: remove the struct cpumask has_work Lai Jiangshan
2014-07-31 3:30 ` Lai Jiangshan
2014-07-31 11:51 ` Michal Hocko
2014-07-31 11:51 ` Michal Hocko
2014-07-31 16:09 ` Chris Metcalf [this message]
2014-07-31 16:09 ` Chris Metcalf
2014-08-01 1:39 ` Lai Jiangshan
2014-08-01 1:39 ` Lai Jiangshan
2014-08-01 17:16 ` Chris Metcalf
2014-08-01 17:16 ` Chris Metcalf
2014-08-01 17:28 ` Frederic Weisbecker
2014-08-01 17:28 ` Frederic Weisbecker
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=53DA6A2F.100@tilera.com \
--to=cmetcalf@tilera.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=fweisbec@gmail.com \
--cc=gilad@benyossef.com \
--cc=hannes@cmpxchg.org \
--cc=khalid.aziz@oracle.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=nasa4836@gmail.com \
--cc=riel@redhat.com \
--cc=tj@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 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.