Hugh Dickins
52b6f46bc1
mm: /proc/sys/vm/stat_refresh to force vmstat update
...
Provide /proc/sys/vm/stat_refresh to force an immediate update of
per-cpu into global vmstats: useful to avoid a sleep(2) or whatever
before checking counts when testing. Originally added to work around a
bug which left counts stranded indefinitely on a cpu going idle (an
inaccuracy magnified when small below-batch numbers represent "huge"
amounts of memory), but I believe that bug is now fixed: nonetheless,
this is still a useful knob.
Its schedule_on_each_cpu() is probably too expensive just to fold into
reading /proc/meminfo itself: give this mode 0600 to prevent abuse.
Allow a write or a read to do the same: nothing to read, but "grep -h
Shmem /proc/sys/vm/stat_refresh /proc/meminfo" is convenient. Oh, and
since global_page_state() itself is careful to disguise any underflow as
0, hack in an "Invalid argument" and pr_warn() if a counter is negative
after the refresh - this helped to fix a misaccounting of
NR_ISOLATED_FILE in my migration code.
But on recent kernels, I find that NR_ALLOC_BATCH and NR_PAGES_SCANNED
often go negative some of the time. I have not yet worked out why, but
have no evidence that it's actually harmful. Punt for the moment by
just ignoring the anomaly on those.
Signed-off-by: Hugh Dickins <hughd@google.com >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: Andres Lagar-Cavilla <andreslc@google.com >
Cc: Yang Shi <yang.shi@linaro.org >
Cc: Ning Qu <quning@gmail.com >
Cc: Mel Gorman <mgorman@techsingularity.net >
Cc: Andres Lagar-Cavilla <andreslc@google.com >
Cc: Konstantin Khlebnikov <koct9i@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2016-05-19 19:12:14 -07:00
..
2016-03-07 14:41:08 +02:00
2016-05-09 11:07:28 +02:00
2016-04-25 20:54:13 +02:00
2016-05-09 16:18:37 +02:00
2016-03-04 23:50:27 -06:00
2016-04-05 16:57:15 +02:00
2016-04-14 14:03:25 +02:00
2016-05-11 10:12:12 +01:00
2016-05-16 19:51:04 -07:00
2016-05-05 23:23:05 -04:00
2016-05-16 13:43:51 -04:00
2016-05-02 10:36:04 +02:00
2016-04-13 10:23:14 +02:00
2016-04-29 11:02:33 +02:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-03-02 20:05:23 +01:00
2016-04-25 14:11:10 +01:00
2016-04-29 16:44:47 +02:00
2016-05-18 12:28:29 -07:00
2016-03-17 12:50:55 -07:00
2016-05-17 12:29:34 -04:00
2016-05-17 18:06:18 +01:00
2016-03-17 15:09:34 -07:00
2016-05-18 13:14:02 -07:00
2016-03-17 21:51:52 -07:00
2016-04-04 10:41:08 -07:00
2016-03-17 15:09:34 -07:00
2016-03-05 12:05:01 -08:00
2016-05-16 16:45:48 +02:00
2016-04-09 03:12:58 +02:00
2016-04-04 12:17:09 -04:00
2016-03-11 14:00:03 +02:00
2016-03-07 16:11:14 -08:00
2016-05-05 09:58:52 +02:00
2016-05-18 18:46:55 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-04-04 10:41:08 -07:00
2016-05-04 23:41:14 +02:00
2016-05-05 13:03:29 -06:00
2016-04-25 19:13:44 -06:00
2016-04-12 15:07:36 -06:00
2016-05-17 16:03:32 -07:00
2016-05-10 08:41:37 -06:00
2016-05-19 19:12:14 -07:00
2016-05-04 00:52:29 -04:00
2016-03-25 11:37:57 -04:00
2016-04-04 10:41:08 -07:00
2016-03-03 21:18:29 +11:00
2016-03-22 15:36:02 -07:00
2016-04-20 17:50:06 +08:00
2016-04-25 15:45:14 -04:00
2016-02-26 16:01:32 -08:00
2016-04-22 11:38:56 -07:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 19:10:03 +01:00
2016-05-06 14:58:25 +02:00
2016-04-08 22:41:36 +02:00
2016-05-06 14:58:25 +02:00
2016-05-06 14:58:22 +02:00
2016-04-25 15:45:14 -04:00
2016-03-22 15:36:02 -07:00
2016-04-15 22:35:44 +08:00
2016-03-01 16:55:48 -08:00
2016-05-01 19:58:39 -04:00
2016-05-17 02:17:59 -04:00
2016-05-19 19:12:14 -07:00
2016-05-03 11:20:07 +09:00
2016-03-10 17:12:09 -05:00
2016-05-19 19:12:14 -07:00
2016-04-26 15:47:32 -07:00
2016-03-19 11:03:49 +01:00
2016-03-20 13:28:18 -07:00
2016-03-14 11:18:12 +05:30
2016-05-07 07:06:13 +02:00
2016-04-18 14:45:08 -04:00
2016-02-25 22:12:26 -08:00
2016-04-04 10:41:08 -07:00
2016-03-15 16:55:16 -07:00
2016-02-26 13:28:35 +02:00
2016-03-25 08:48:31 -07:00
2016-05-02 19:49:28 -04:00
2016-05-16 13:49:32 -04:00
2016-02-29 08:35:10 +01:00
2016-03-17 15:09:34 -07:00
2016-05-17 15:05:23 -07:00
2016-04-12 10:25:30 -07:00
2016-05-19 19:12:14 -07:00
2016-03-14 00:17:28 -04:00
2016-05-17 17:11:27 -07:00
2016-05-10 15:43:09 -04:00
2016-03-17 15:09:34 -07:00
2016-05-02 13:01:51 -07:00
2016-03-17 15:09:34 -07:00
2016-04-28 19:34:04 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-01 16:57:20 -08:00
2016-04-06 13:18:19 +02:00
2016-04-13 10:41:08 +02:00
2016-03-11 14:58:58 -05:00
2016-05-03 16:00:54 -04:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-04-05 13:25:12 +02:00
2016-03-16 17:45:56 -07:00
2016-05-11 19:31:40 -04:00
2016-05-02 13:42:51 +02:00
2016-05-02 13:42:51 +02:00
2016-05-02 13:42:50 +02:00
2016-05-16 11:14:29 -04:00
2016-02-22 23:19:09 -05:00
2016-03-25 16:37:42 -07:00
2016-03-22 15:36:02 -07:00
2016-05-19 19:12:14 -07:00
2016-05-09 12:15:03 -04:00
2016-03-22 15:36:02 -07:00
2016-02-25 11:27:16 +01:00
2016-05-06 10:26:07 +02:00
2016-02-25 16:37:06 -05:00
2016-03-05 12:24:06 -08:00
2016-05-06 12:51:10 -06:00
2016-03-17 15:09:34 -07:00
2016-03-09 15:43:42 -08:00
2016-05-17 12:06:35 +02:00
2016-05-16 14:47:16 -07:00
2016-05-17 14:41:03 -07:00
2016-02-22 22:44:04 -05:00
2016-03-14 12:19:46 -04:00
2016-04-11 21:15:48 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-17 13:47:50 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-03-20 16:47:13 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-04-28 11:44:19 +02:00
2016-05-19 19:12:14 -07:00
2016-04-01 15:00:10 +02:00
2016-05-10 23:56:28 -04:00
2016-03-05 12:24:06 -08:00
2016-05-04 00:52:29 -04:00
2016-04-21 14:14:58 -04:00
2016-05-16 13:49:31 -04:00
2016-03-02 20:05:26 +01:00
2016-03-17 14:57:16 -04:00
2016-05-17 15:05:23 -07:00
2016-04-04 10:41:08 -07:00
2016-05-09 11:39:45 -04:00
2016-04-04 10:41:08 -07:00
2016-04-25 15:09:11 -04:00
2016-03-23 12:34:17 +01:00
2016-05-19 19:12:14 -07:00
2016-03-01 20:36:58 +01:00
2016-03-21 19:30:06 -04:00
2016-05-02 09:13:35 -06:00
2016-03-01 16:55:48 -08:00
2016-05-16 17:17:24 -07:00
2016-03-25 16:37:42 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 16:55:16 -07:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-05 17:38:53 -07:00
2016-05-19 19:12:14 -07:00
2016-03-15 08:52:28 -05:00
2016-03-07 11:39:16 -06:00
2016-04-15 13:00:11 -05:00
2016-05-17 16:26:30 -07:00
2016-03-14 15:43:11 -04:00
2016-05-10 15:06:19 -04:00
2016-04-09 03:10:50 +02:00
2016-03-17 02:32:04 +01:00
2016-04-22 02:29:17 +02:00
2016-05-05 01:38:44 +02:00
2016-04-22 01:32:37 +02:00
2016-04-22 01:32:37 +02:00
2016-04-14 09:01:47 -06:00
2016-04-22 10:29:05 +02:00
2016-03-15 16:55:16 -07:00
2016-05-19 19:12:14 -07:00
2016-03-31 00:30:26 -04:00
2016-03-02 16:44:27 +01:00
2016-03-02 17:13:02 -08:00
2016-04-09 03:10:50 +02:00
2016-04-25 23:47:44 +02:00
2016-03-10 09:43:36 -08:00
2016-03-03 14:23:43 -08:00
2016-05-03 13:44:37 +02:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-02-27 10:28:52 -08:00
2016-04-14 21:14:03 -04:00
2016-04-23 18:51:33 -04:00
2016-03-31 13:34:50 -07:00
2016-03-31 13:37:37 -07:00
2016-03-31 13:37:37 -07:00
2016-03-05 21:30:41 +09:00
2016-05-12 15:50:19 -07:00
2016-03-30 15:42:03 +02:00
2016-04-04 18:15:23 +02:00
2016-02-24 09:12:45 +01:00
2016-04-05 10:56:32 +02:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2016-03-10 16:04:24 -08:00
2016-05-06 11:09:00 -07:00
2016-03-14 17:08:15 +01:00
2016-04-13 10:42:20 +02:00
2016-04-22 08:58:33 +02:00
2016-04-15 16:53:14 -04:00
2016-05-16 19:17:22 -07:00
2016-04-15 17:29:35 -04:00
2016-05-17 14:41:03 -07:00
2016-04-14 12:56:09 -07:00
2016-05-03 08:37:59 +02:00
2016-05-03 00:22:19 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-03-25 16:37:42 -07:00
2016-05-08 23:46:14 -04:00
2016-02-23 19:59:55 -08:00
2016-03-25 16:37:42 -07:00
2016-04-02 20:23:09 -04:00
2016-05-19 19:12:14 -07:00
2016-02-25 11:27:16 +01:00
2016-05-12 15:52:50 -07:00
2016-03-04 12:20:10 -05:00
2016-03-14 14:55:26 -04:00
2016-04-20 20:31:14 -07:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-03-02 17:13:17 -08:00
2016-04-22 11:49:04 -07:00
2016-05-18 18:55:19 -07:00
2016-03-15 16:55:16 -07:00
2016-03-09 11:58:41 -05:00
2016-04-26 15:47:32 -07:00
2016-05-18 18:46:55 -07:00
2016-05-04 16:55:11 -04:00
2016-04-07 16:53:29 -04:00
2016-04-08 19:46:28 -04:00
2016-04-13 12:02:28 -07:00
2016-03-02 17:01:57 +02:00
2016-03-02 17:01:57 +02:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-02-24 09:09:45 +01:00
2016-03-16 21:11:19 +01:00
2016-03-03 14:42:50 -07:00
2016-04-11 00:48:00 -04:00