per-zone pte_chain freelists
Subsystems (5)
PATCH 1/1 per-zone pte_chain freelists
Against current rmap bk sources.
Available from bk://linux-wli.bkbits.net/rmap_locking/
In order to remove broader locks, smaller critical sections manipulating some well-defined portion of the program state must be identified and removed from the scope of its protection. This patch identifies one such set of critical sections and its associated program state, and endows it with its own partitioned dataset and set of locks.
While redundant by itself, after a later removal of global locks it becomes quite necessary, as the global pte_chain_freelist falls under the protection of the pagemap_lru_lock.
Tested in isolation on top of current rmap bk sources with 10 hours of Cerberus on an 8-way logical HT i386 machine. Other stress testing was done in combination with other patches.
Cheers,
Bill
P.S. This one's pretty safe; I can make some noise with this while
brewing up docs I should put out after getting all the background resarch done for this and letting stress tests spin on the later stuff in the series.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.402 -> 1.403 # mm/rmap.c 1.1 -> 1.2
# include/linux/mmzone.h 1.9 -> 1.10
# mm/page_alloc.c 1.45 -> 1.46
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/16 [email protected] 1.403
# logging_ok:
# Logging to [email protected] accepted
# rmap.c:
# Eliminate global pte_chain_freelist and use per-zone pte_chain_freelists, protected by per-zone pte_chain_freelist_locks.
# page_alloc.c:
# Initialize per-zone pte_chain_freelist and pte_chain_freelist_locks.
# mmzone.h:
# Add per-zone pte_chain_freelist and pte_chain_freelist_lock fields to mmzone.h
# --------------------------------------------
#
include/linux/mmzone.h +3 -0
@@ -25,6 +25,7 @@ } free_area_t;struct pglist_data ; +struct pte_chain ;/* * On machines where it is needed (eg PCs) we divide physical memory
@@ -53,6 +54,8 @@struct list_head inactive_dirty_list;struct list_head inactive_clean_list;free_area_t free_area[MAX_ORDER ]; +spinlock_t pte_chain_freelist_lock; +struct pte_chain *pte_chain_freelist;/* * wait_table -- the array holding the hash table
mm/page_alloc.c +2 -0
@@ -910,9 +910,11 @@ zone->inactive_clean_pages =0 ; zone->inactive_dirty_pages =0 ; zone->need_balance =0 ; + zone->pte_chain_freelist =NULL ;INIT_LIST_HEAD (&zone->active_list);INIT_LIST_HEAD (&zone->inactive_dirty_list);INIT_LIST_HEAD (&zone->inactive_clean_list); +spin_lock_init (&zone->pte_chain_freelist_lock);if (!size)continue ;
mm/rmap.c +49 -19
154 lines not on this page · raw message