linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuset: Fix incorrect memory_pressure control file mapping
@ 2017-08-24 16:04 Waiman Long
  2017-08-24 16:45 ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Waiman Long @ 2017-08-24 16:04 UTC (permalink / raw)
  To: Tejun Heo, Li Zefan, Johannes Weiner; +Cc: cgroups, linux-kernel, Waiman Long

The memory_pressure control file was incorrectly set up without
a private value (0, by default). As a result, this control
file was treated like memory_migrate on read. By adding back the
FILE_MEMORY_PRESSURE private value, the correct memory pressure value
will be returned.

Signed-off-by: Waiman Long <longman@redhat.com>
---
 kernel/cgroup/cpuset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index f3539a4..84ba237 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1898,6 +1898,7 @@ static s64 cpuset_read_s64(struct cgroup_subsys_state *css, struct cftype *cft)
 	{
 		.name = "memory_pressure",
 		.read_u64 = cpuset_read_u64,
+		.private = FILE_MEMORY_PRESSURE,
 	},
 
 	{
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpuset: Fix incorrect memory_pressure control file mapping
  2017-08-24 16:04 [PATCH] cpuset: Fix incorrect memory_pressure control file mapping Waiman Long
@ 2017-08-24 16:45 ` Tejun Heo
  2017-08-24 17:51   ` Waiman Long
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2017-08-24 16:45 UTC (permalink / raw)
  To: Waiman Long; +Cc: Li Zefan, Johannes Weiner, cgroups, linux-kernel

On Thu, Aug 24, 2017 at 12:04:29PM -0400, Waiman Long wrote:
> The memory_pressure control file was incorrectly set up without
> a private value (0, by default). As a result, this control
> file was treated like memory_migrate on read. By adding back the
> FILE_MEMORY_PRESSURE private value, the correct memory pressure value
> will be returned.
> 
> Signed-off-by: Waiman Long <longman@redhat.com>

Oops, applied to cgroup/for-4.13-fixes w/ stable cc'd.  I broke it way
back in v4.4 which makes me wonder whether anybody is actually using
it.

Thanks a lot for catching it.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpuset: Fix incorrect memory_pressure control file mapping
  2017-08-24 16:45 ` Tejun Heo
@ 2017-08-24 17:51   ` Waiman Long
  0 siblings, 0 replies; 3+ messages in thread
From: Waiman Long @ 2017-08-24 17:51 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Li Zefan, Johannes Weiner, cgroups, linux-kernel

On 08/24/2017 12:45 PM, Tejun Heo wrote:
> On Thu, Aug 24, 2017 at 12:04:29PM -0400, Waiman Long wrote:
>> The memory_pressure control file was incorrectly set up without
>> a private value (0, by default). As a result, this control
>> file was treated like memory_migrate on read. By adding back the
>> FILE_MEMORY_PRESSURE private value, the correct memory pressure value
>> will be returned.
>>
>> Signed-off-by: Waiman Long <longman@redhat.com>
> Oops, applied to cgroup/for-4.13-fixes w/ stable cc'd.  I broke it way
> back in v4.4 which makes me wonder whether anybody is actually using
> it.

Probably not.

Cheers,
Longman

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-24 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 16:04 [PATCH] cpuset: Fix incorrect memory_pressure control file mapping Waiman Long
2017-08-24 16:45 ` Tejun Heo
2017-08-24 17:51   ` Waiman Long

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).