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

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