+
+static void
+__lru_pool_daemon()
+{
+ struct lru_zone *pos, *n;
+
+ while (true)
+ {
+ spinlock_acquire(&zone_list_lock);
+
+ // TODO add a watermark check before doing eviction
+ llist_for_each(pos, n, &zone_lead, zones) {
+ lru_evict_half(pos);
+ }
+
+ spinlock_release(&zone_list_lock);
+
+ kthread_sleep(10);
+ }
+}
+
+static void
+__lru_pool_init()
+{
+ // TODO make sure other are thread-safe first
+
+ // kthread_spawn((ptr_t)__lru_pool_daemon);
+}
+owloysius_fetch_init(__lru_pool_init, on_postboot)
+
+