Hi!
From: Johannes Weiner hannes@cmpxchg.org
[ Upstream commit 204cb79ad42f015312a5bbd7012d09c93d9b46fb ]
Currently, the drop_caches proc file and sysctl read back the last value written, suggesting this is somehow a stateful setting instead of a one-time command. Make it write-only, like e.g. compact_memory.
I have no problem with that, but is it good idea for stable?
Plus, I seem to recall that drop_caches was somehow dangerous, debugging-only stuff, one should not use on production system. Did that get fixed in the meantime?
Best regards, Pavel
@@ -1411,7 +1411,7 @@ static struct ctl_table vm_table[] = { .procname = "drop_caches", .data = &sysctl_drop_caches, .maxlen = sizeof(int),
.mode = 0644,
.proc_handler = drop_caches_sysctl_handler, .extra1 = &one, .extra2 = &four,.mode = 0200,