Files
linux/include/linux
Tang Yizhou f1ab2831e2 writeback: let trace_balance_dirty_pages() take struct dtc as parameter
Patch series "Fix calculations in trace_balance_dirty_pages() for cgwb", v2.

In my experiment, I found that the output of trace_balance_dirty_pages()
in the cgroup writeback scenario was strange because
trace_balance_dirty_pages() always uses global_wb_domain.dirty_limit for
related calculations instead of the dirty_limit of the corresponding
memcg's wb_domain.

The basic idea of the fix is to store the hard dirty limit value computed
in wb_position_ratio() into struct dirty_throttle_control and use it for
calculations in trace_balance_dirty_pages().


This patch (of 3):

Currently, trace_balance_dirty_pages() already has 12 parameters.  In the
patch #3, I initially attempted to introduce an additional parameter. 
However, in include/linux/trace_events.h, bpf_trace_run12() only supports
up to 12 parameters and bpf_trace_run13() does not exist.

To reduce the number of parameters in trace_balance_dirty_pages(), we can
make it accept a pointer to struct dirty_throttle_control as a parameter. 
To achieve this, we need to move the definition of struct
dirty_throttle_control from mm/page-writeback.c to
include/linux/writeback.h.

Link: https://lkml.kernel.org/r/20250304110318.159567-1-yizhou.tang@shopee.com
Link: https://lkml.kernel.org/r/20250304110318.159567-2-yizhou.tang@shopee.com
Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kara <jack@suse.cz>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
Cc: Tang Yizhou <yizhou.tang@shopee.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-17 00:05:37 -07:00
..
2024-10-22 15:54:11 +02:00
2024-10-11 14:34:11 -04:00
2024-10-13 17:16:57 +02:00
2024-10-11 14:37:29 +05:30
2024-10-14 23:27:57 +05:30
2024-11-11 10:45:03 +01:00
2024-10-09 15:42:48 +01:00
2025-01-04 15:27:35 -07:00
2025-03-06 17:50:55 -07:00
2024-10-14 18:33:04 -07:00
2025-01-06 07:36:39 -07:00
2025-01-18 12:33:39 -08:00
2024-11-05 13:32:21 +01:00
2024-10-22 11:16:56 +02:00
2024-12-17 09:16:11 +01:00
2024-10-19 14:16:45 +02:00
2025-01-25 20:22:31 -08:00
2024-11-09 14:55:33 +01:00
2024-11-28 14:49:28 +01:00
2025-01-09 10:06:14 +01:00
2025-01-07 18:06:51 -08:00
2024-11-24 17:05:27 -08:00
2024-12-18 09:39:37 +01:00
2024-10-16 21:56:59 +02:00
2025-01-25 08:22:26 +00:00
2024-09-20 18:28:26 +03:00
2024-11-05 16:56:26 -08:00
2025-01-14 19:45:35 +01:00
2024-12-13 08:49:31 -07:00
2024-12-09 13:48:23 -08:00
2025-02-04 11:27:45 -05:00
2024-10-14 16:33:24 -05:00
2025-03-16 22:06:28 -07:00
2025-01-15 15:07:23 -08:00
2025-02-25 15:07:24 -05:00
2024-09-23 15:03:30 -04:00
2024-11-05 16:56:26 -08:00
2025-01-25 20:22:42 -08:00
2025-03-16 22:06:22 -07:00
2025-02-10 09:22:32 +01:00
2024-11-16 10:09:30 -06:00
2024-10-02 16:23:10 -05:00
2025-03-17 00:05:34 -07:00
2025-01-16 17:22:59 -08:00
2024-12-22 11:03:10 +01:00
2025-01-10 11:59:00 +01:00
2025-01-07 15:16:48 +01:00
2024-11-05 12:55:38 +01:00
2025-03-16 17:40:22 -07:00
2025-01-02 10:37:14 -06:00
2024-12-09 14:44:59 -08:00
2025-01-08 14:50:11 -08:00
2024-12-19 19:51:13 -08:00
2025-01-29 13:32:23 -08:00
2025-03-16 22:06:21 -07:00
2025-01-29 09:04:28 -08:00
2024-11-06 12:59:44 -05:00
2024-10-02 16:53:38 +02:00
2024-11-18 11:56:21 +00:00
2024-12-23 08:17:16 -07:00
2024-12-09 14:44:59 -08:00
2024-11-06 12:59:44 -05:00
2025-03-16 22:06:01 -07:00