Commit 314997f5 authored by Koki Ryu's avatar Koki Ryu Committed by Chromeos LUCI
Browse files

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: default avatarKoki Ryu <kokiryu@google.com>
Signed-off-by: default avatarSuleiman Souhlal <suleiman@google.com>

Change-Id: I6749710fcb2b66103dd7ea605123f15bacf65897
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4376258


Reviewed-by: default avatarKameron Lutes <kalutes@chromium.org>
Tested-by: default avatarSuleiman Souhlal <suleiman@chromium.org>
Commit-Queue: Suleiman Souhlal <suleiman@chromium.org>
Auto-Submit: Suleiman Souhlal <suleiman@chromium.org>
parent 4eb34021
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment