020-v6.1-04-Revert-include-linux-mm_inline.h-fold-__update_lru_s.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From 03705be42114db7cc5bd6eb7bf7e8703c94d4880 Mon Sep 17 00:00:00 2001
  2. From: Yu Zhao <[email protected]>
  3. Date: Sun, 18 Sep 2022 02:00:01 -0600
  4. Subject: [PATCH 04/29] Revert "include/linux/mm_inline.h: fold
  5. __update_lru_size() into its sole caller"
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. This patch undoes the following refactor: commit 289ccba18af4
  10. ("include/linux/mm_inline.h: fold __update_lru_size() into its sole
  11. caller")
  12. The upcoming changes to include/linux/mm_inline.h will reuse
  13. __update_lru_size().
  14. Link: https://lkml.kernel.org/r/[email protected]
  15. Signed-off-by: Yu Zhao <[email protected]>
  16. Reviewed-by: Miaohe Lin <[email protected]>
  17. Acked-by: Brian Geffon <[email protected]>
  18. Acked-by: Jan Alexander Steffens (heftig) <[email protected]>
  19. Acked-by: Oleksandr Natalenko <[email protected]>
  20. Acked-by: Steven Barrett <[email protected]>
  21. Acked-by: Suleiman Souhlal <[email protected]>
  22. Tested-by: Daniel Byrne <[email protected]>
  23. Tested-by: Donald Carr <[email protected]>
  24. Tested-by: Holger Hoffstätte <[email protected]>
  25. Tested-by: Konstantin Kharlamov <[email protected]>
  26. Tested-by: Shuang Zhai <[email protected]>
  27. Tested-by: Sofia Trinh <[email protected]>
  28. Tested-by: Vaibhav Jain <[email protected]>
  29. Cc: Andi Kleen <[email protected]>
  30. Cc: Aneesh Kumar K.V <[email protected]>
  31. Cc: Barry Song <[email protected]>
  32. Cc: Catalin Marinas <[email protected]>
  33. Cc: Dave Hansen <[email protected]>
  34. Cc: Hillf Danton <[email protected]>
  35. Cc: Jens Axboe <[email protected]>
  36. Cc: Johannes Weiner <[email protected]>
  37. Cc: Jonathan Corbet <[email protected]>
  38. Cc: Linus Torvalds <[email protected]>
  39. Cc: Matthew Wilcox <[email protected]>
  40. Cc: Mel Gorman <[email protected]>
  41. Cc: Michael Larabel <[email protected]>
  42. Cc: Michal Hocko <[email protected]>
  43. Cc: Mike Rapoport <[email protected]>
  44. Cc: Mike Rapoport <[email protected]>
  45. Cc: Peter Zijlstra <[email protected]>
  46. Cc: Qi Zheng <[email protected]>
  47. Cc: Tejun Heo <[email protected]>
  48. Cc: Vlastimil Babka <[email protected]>
  49. Cc: Will Deacon <[email protected]>
  50. Signed-off-by: Andrew Morton <[email protected]>
  51. ---
  52. include/linux/mm_inline.h | 9 ++++++++-
  53. 1 file changed, 8 insertions(+), 1 deletion(-)
  54. --- a/include/linux/mm_inline.h
  55. +++ b/include/linux/mm_inline.h
  56. @@ -24,7 +24,7 @@ static inline int page_is_file_lru(struc
  57. return !PageSwapBacked(page);
  58. }
  59. -static __always_inline void update_lru_size(struct lruvec *lruvec,
  60. +static __always_inline void __update_lru_size(struct lruvec *lruvec,
  61. enum lru_list lru, enum zone_type zid,
  62. int nr_pages)
  63. {
  64. @@ -33,6 +33,13 @@ static __always_inline void update_lru_s
  65. __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
  66. __mod_zone_page_state(&pgdat->node_zones[zid],
  67. NR_ZONE_LRU_BASE + lru, nr_pages);
  68. +}
  69. +
  70. +static __always_inline void update_lru_size(struct lruvec *lruvec,
  71. + enum lru_list lru, enum zone_type zid,
  72. + long nr_pages)
  73. +{
  74. + __update_lru_size(lruvec, lru, zid, nr_pages);
  75. #ifdef CONFIG_MEMCG
  76. mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
  77. #endif