Thread (32 messages) read the whole thread 32 messages, 8 authors, 2022-01-24

Re: [PATCH] mm: split thp synchronously on MADV_DONTNEED

From: Shakeel Butt <hidden>
Date: 2021-11-22 03:42:23
Also in: lkml

On Sun, Nov 21, 2021 at 4:50 PM Kirill A. Shutemov [off-list ref] wrote:
[...]
Have you considered impact on short-living tasks where paying splitting
tax would hurt performace without any benefits? Maybe a sparete madvise
opration needed? I donno.
Do you have a concrete example of such short-living applications doing
MADV_DONTNEED? I can try to get some numbers to measure the impact.

Regarding the new advice option, I did give some thought to it but
decided against it based on the reason that we should not be exposing
some low level kernel implementation detail to users through a stable
API.

[...]
quoted
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9d27fd0ce5df..a984bb6509d9 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1412,6 +1412,10 @@ struct task_struct {
      struct mem_cgroup               *active_memcg;
 #endif

+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+     struct list_head                *deferred_split_list;
+#endif
+
 #ifdef CONFIG_BLK_CGROUP
      struct request_queue            *throttle_queue;
 #endif
It looks dirty. We really don't have options to pass it down?

Maybe passdown the list via zap_details and call a new rmap remove helper
if the list is present?
We already have precedence on using this technique for other cases but
let me take a stab at passing the list through zap_details and see how
that looks.
quoted
+void split_local_deferred_list(struct list_head *defer_list)
[...]
Looks like a lot of copy-paste from deferred_split_scan(). Can we get them
consolidated?
I will see what I can do.

Thanks for the review.
Shakeel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help