CHROMIUM: MGLRU: sysfs notification using a kernfs_node
CL:3936130 used sysfs_notify to notify the change of the memory generations to the user space. However, this change caused a lock dependency issue. The lock is taken in the retrieval of the corresponding kernfs_node, so we solve this problem by simply holding the node as a global variable. BUG=b:260967742 TEST=Run /google/data/ro/users/su/suleiman/tests/poll.c on /sys/kernel/mm/lru_gen/admin while generating memory pressure with /google/data/ro/users/su/suleiman/tests/memtoy, ensuring it returns a POLLPRI event. Also made sure kernel built with USE=lockdebug doesn't have warnings. Signed-off-by:Koki Ryu <kokiryu@google.com> Signed-off-by:
Suleiman Souhlal <suleiman@google.com> Change-Id: I6749710fcb2b66103dd7ea605123f15bacf65897 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4376258 Reviewed-by:
Kameron Lutes <kalutes@chromium.org> Tested-by:
Suleiman Souhlal <suleiman@chromium.org> Commit-Queue: Suleiman Souhlal <suleiman@chromium.org> Auto-Submit: Suleiman Souhlal <suleiman@chromium.org>
Loading
Please sign in to comment