memcontrol.c (1136fa0c07de570dc17858745af8be169d1440ba) memcontrol.c (dc90f0846df4870b6cc8528c31e5c60f18fb68be)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* memcontrol.c - Memory Controller
3 *
4 * Copyright IBM Corporation, 2007
5 * Author Balbir Singh <balbir@linux.vnet.ibm.com>
6 *
7 * Copyright 2007 OpenVZ SWsoft Inc
8 * Author: Pavel Emelianov <xemul@openvz.org>

--- 39 unchanged lines hidden (view full) ---

48#include <linux/swapops.h>
49#include <linux/spinlock.h>
50#include <linux/eventfd.h>
51#include <linux/poll.h>
52#include <linux/sort.h>
53#include <linux/fs.h>
54#include <linux/seq_file.h>
55#include <linux/vmpressure.h>
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* memcontrol.c - Memory Controller
3 *
4 * Copyright IBM Corporation, 2007
5 * Author Balbir Singh <balbir@linux.vnet.ibm.com>
6 *
7 * Copyright 2007 OpenVZ SWsoft Inc
8 * Author: Pavel Emelianov <xemul@openvz.org>

--- 39 unchanged lines hidden (view full) ---

48#include <linux/swapops.h>
49#include <linux/spinlock.h>
50#include <linux/eventfd.h>
51#include <linux/poll.h>
52#include <linux/sort.h>
53#include <linux/fs.h>
54#include <linux/seq_file.h>
55#include <linux/vmpressure.h>
56#include <linux/memremap.h>
56#include <linux/mm_inline.h>
57#include <linux/swap_cgroup.h>
58#include <linux/cpu.h>
59#include <linux/oom.h>
60#include <linux/lockdep.h>
61#include <linux/file.h>
62#include <linux/tracehook.h>
63#include <linux/psi.h>

--- 1188 unchanged lines hidden (view full) ---

1252/**
1253 * mem_cgroup_update_lru_size - account for adding or removing an lru page
1254 * @lruvec: mem_cgroup per zone lru vector
1255 * @lru: index of lru list the page is sitting on
1256 * @zid: zone id of the accounted pages
1257 * @nr_pages: positive when adding or negative when removing
1258 *
1259 * This function must be called under lru_lock, just before a page is added
57#include <linux/mm_inline.h>
58#include <linux/swap_cgroup.h>
59#include <linux/cpu.h>
60#include <linux/oom.h>
61#include <linux/lockdep.h>
62#include <linux/file.h>
63#include <linux/tracehook.h>
64#include <linux/psi.h>

--- 1188 unchanged lines hidden (view full) ---

1253/**
1254 * mem_cgroup_update_lru_size - account for adding or removing an lru page
1255 * @lruvec: mem_cgroup per zone lru vector
1256 * @lru: index of lru list the page is sitting on
1257 * @zid: zone id of the accounted pages
1258 * @nr_pages: positive when adding or negative when removing
1259 *
1260 * This function must be called under lru_lock, just before a page is added
1260 * to or just after a page is removed from an lru list (that ordering being
1261 * so as to allow it to check that lru_size 0 is consistent with list_empty).
1261 * to or just after a page is removed from an lru list.
1262 */
1263void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru,
1264 int zid, int nr_pages)
1265{
1266 struct mem_cgroup_per_node *mz;
1267 unsigned long *lru_size;
1268 long size;
1269

--- 6190 unchanged lines hidden ---
1262 */
1263void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru,
1264 int zid, int nr_pages)
1265{
1266 struct mem_cgroup_per_node *mz;
1267 unsigned long *lru_size;
1268 long size;
1269

--- 6190 unchanged lines hidden ---