]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Revert "mm/damon/lru_sort: adjust local variable to dynamic allocation"
authorSeongJae Park <sj@kernel.org>
Mon, 26 Aug 2024 04:23:23 +0000 (21:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 9 Sep 2024 23:39:00 +0000 (16:39 -0700)
commit2986846437e21dcfdd7531d50a0020e98087b586
treea6cae9e86dd25390668332adaede343a75c40ded
parente3bcb1672583f2e1cf456e4303ce562a3cc775c0
Revert "mm/damon/lru_sort: adjust local variable to dynamic allocation"

This reverts commit 0742cadf5e4c ("mm/damon/lru_sort: adjust local
variable to dynamic allocation").

The commit was introduced to avoid unnecessary usage of stack memory for
per-scheme region priorities histogram buffer.  The fix is nice, but the
point of the fix looks not very clear if the commit message is not read
together.  That's mainly because the buffer is a private field, which
means it is hidden from the DAMON API users.  That's not the fault of the
fix but the underlying data structure.

Now the per-scheme histogram buffer is gone, so the problem that the
commit was fixing is also removed.  The use of kmemdup() has no more point
but just making the code bit difficult to understand.  Revert the fix.

Link: https://lkml.kernel.org/r/20240826042323.87025-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/lru_sort.c