Commit fa23a33
mm: separate folio_split_memcg_refs() from split_page_memcg()
Patch series "Minor memcg cleanups & prep for memdescs", v2.
Separate the handling of accounted folios and GFP_ACCOUNT pages for easier
to understand code. For more detail, see
https://lore.kernel.org/linux-mm/[email protected]/
This patch (of 5):
Folios always use memcg_data to refer to the mem_cgroup while pages
allocated with GFP_ACCOUNT have a pointer to the obj_cgroup. Since the
caller already knows what it has, split the function into two and then we
don't need to check.
Move the assignment of split folio memcg_data to the point where we set up
the other parts of the new folio. That leaves folio_split_memcg_refs()
just handling the memcg accounting.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Acked-by: Zi Yan <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Matthew Wilcow (Oracle) <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent cb44821 commit fa23a33
3 files changed
+24
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
| 1042 | + | |
| 1043 | + | |
1042 | 1044 | | |
1043 | 1045 | | |
1044 | 1046 | | |
| |||
1463 | 1465 | | |
1464 | 1466 | | |
1465 | 1467 | | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1466 | 1473 | | |
1467 | 1474 | | |
1468 | 1475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3394 | 3394 | | |
3395 | 3395 | | |
3396 | 3396 | | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
3397 | 3400 | | |
3398 | 3401 | | |
3399 | 3402 | | |
| |||
3525 | 3528 | | |
3526 | 3529 | | |
3527 | 3530 | | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
3531 | | - | |
3532 | | - | |
3533 | | - | |
3534 | | - | |
3535 | | - | |
3536 | | - | |
3537 | | - | |
3538 | | - | |
3539 | | - | |
| 3531 | + | |
3540 | 3532 | | |
3541 | 3533 | | |
3542 | 3534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3081 | 3081 | | |
3082 | 3082 | | |
3083 | 3083 | | |
3084 | | - | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
3088 | 3097 | | |
3089 | 3098 | | |
3090 | 3099 | | |
| |||
0 commit comments