参照元

説明

引数

返り値

参考

実装

CONFIG_SMP 有効: linux-4.4.1/mm/vmstat.c

/*
 * For use when we know that interrupts are disabled,
 * or when we know that preemption is disabled and that
 * particular counter cannot be updated from interrupt context.
 */
void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
			   long delta)
{
	struct per_cpu_pageset __percpu *pcp = zone->pageset;
	s8 __percpu *p = pcp->vm_stat_diff + item;
	long x;
	long t;
	x = delta + __this_cpu_read(*p);

	t = __this_cpu_read(pcp->stat_threshold);
	if (unlikely(x > t || x < -t)) {
		zone_page_state_add(x, zone, item);
		x = 0;
	}
	__this_cpu_write(*p, x);
}
EXPORT_SYMBOL(__mod_zone_page_state);

CONFIG_SMP 無効: linux-4.4.1/include/linux/vmstat.h

/*
 * We do not maintain differentials in a single processor configuration.
 * The functions directly modify the zone and global counters.
 */
static inline void __mod_zone_page_state(struct zone *zone,
			enum zone_stat_item item, long delta)
{
	zone_page_state_add(delta, zone, item);
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS