Skip to contentSkip to conversation

vmpressure-in-kernel-notifications.patch removed from -mm tree

to-be-updated [email protected] 1 participant 1 message Jun 6, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [to-be-updated] vmpressure-in-kernel-notifications.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 06 Jun 2013 12:35:27 -0700

The patch titled
Subject: vmpressure: in-kernel notifications
has been removed from the -mm tree. Its filename was
vmpressure-in-kernel-notifications.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Glauber Costa <[email protected]>
Subject: vmpressure: in-kernel notifications

During the past weeks, it became clear to us that the shrinker interface we have right now works very well for some particular types of users, but not that well for others. The later are usually people interested in one-shot notifications, that were forced to adapt themselves to the count+scan behavior of shrinkers. To do so, they had no choice than to greatly abuse the shrinker interface producing little monsters all over.

During LSF/MM, one of the proposals that popped out during our session was to reuse Anton Voronstsov's vmpressure for this. They are designed for userspace consumption, but also provide a well-stablished, cgroup-aware entry point for notifications.

This patch extends that to also support in-kernel users. Events that should be generated for in-kernel consumption will be marked as such, and for those, we will call a registered function instead of triggering an eventfd notification.

Please note that due to my lack of understanding of each shrinker user, I will stay away from converting the actual users, you are all welcome to do so.

Cc Glauber Costa <[email protected]>
Cc Dave Chinner <[email protected]>

---

 include/linux/vmpressure.h |    6 ++++
 mm/vmpressure.c            |   52 ++++++++++++++++++++++++++++++++---
 2 files changed, 55 insertions(+), 3 deletions(-)
include/linux/vmpressure.h renamed from include/linux/vmpressure.h~vmpressure-in-kernel-notifications +6 -0
diff -puN include/linux/vmpressure.h~vmpressure-in-kernel-notifications include/linux/vmpressure.h
@@ -19,6 +19,9 @@ struct vmpressure {
 	/* Have to grab the lock on events traversal or modifications. */
 	struct mutex events_lock;
 
+	/* False if only kernel users want to be notified, true otherwise. */
+	bool notify_userspace;
+
 	struct work_struct work;
 };
 
@@ -36,6 +39,9 @@ extern struct vmpressure *css_to_vmpress
 extern int vmpressure_register_event(struct cgroup *cg, struct cftype *cft,
 				     struct eventfd_ctx *eventfd,
 				     const char *args);
+
+extern int vmpressure_register_kernel_event(struct cgroup *cg,
+					    void (*fn)(void));
 extern void vmpressure_unregister_event(struct cgroup *cg, struct cftype *cft,
 					struct eventfd_ctx *eventfd);
 #else
mm/vmpressure.c renamed from mm/vmpressure.c~vmpressure-in-kernel-notifications +49 -3

90 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

memcg-dont-initialize-kmem-cache-destroying-work-for-root-caches.patch mm-memcontrol-fix-lockless-reclaim-hierarchy-iterator.patch clear_refs-sanitize-accepted-commands-declaration.patch clear_refs-introduce-private-struct-for-mm_walk.patch pagemap-introduce-pagemap_entry_t-without-pmshift-bits.patch pagemap-introduce-pagemap_entry_t-without-pmshift-bits-v4.patch mm-soft-dirty-bits-for-user-memory-changes-tracking.patch mm-soft-dirty-bits-for-user-memory-changes-tracking-call-mmu-notifiers-when-write-protecting-ptes.patch pagemap-prepare-to-reuse-constant-bits-with-page-shift.patch mm-memcontrol-factor-out-reclaim-iterator-loading-and-updating.patch