core/lib change for v4.7
Subsystems (2)
Linus,
Please pull the latest core-lib-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-lib-for-linus
# HEAD: d18d12d0ff07c47fb913f297c174f30a3f96042d lib/proportions: Remove unused code
This tree contains a single commit that removes an unused facility that the scheduler used to make use of.
Thanks,
Ingo
------------------>
Richard Cochran (1):
lib/proportions: Remove unused code
include/linux/proportions.h | 137 --------------- include/linux/sched.h | 1 - lib/Makefile | 2 +- lib/proportions.c | 407 -------------------------------------------- 4 files changed, 1 insertion(+), 546 deletions(-) delete mode 100644 include/linux/proportions.h delete mode 100644 lib/proportions.c
include/linux/proportions.h deleted +0 -137
@@ -1,137 +0,0 @@ -/* -* FLoating proportions -* -* Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra -* -* This file contains the public data structure and API definitions. -*/ - -#ifndef _LINUX_PROPORTIONS_H -#define _LINUX_PROPORTIONS_H - -#include <linux/percpu_counter.h> -#include <linux/spinlock.h> -#include <linux/mutex.h> -#include <linux/gfp.h> - -struct prop_global { -/* -* The period over which we differentiate -* -* period = 2^shift -*/ -int shift; -/* -* The total event counter aka 'time'. -* -* Treated as an unsigned long; the lower 'shift - 1' bits are the -* counter bits, the remaining upper bits the period counter. -*/ -struct percpu_counter events; -}; - -/* -* global proportion descriptor -* -* this is needed to consistently flip prop_global structures. -*/ -struct prop_descriptor { -int index; -struct prop_global pg[2 ]; -struct mutex mutex;/* serialize the prop_global switch */ -}; - -int prop_descriptor_init (struct prop_descriptor *pd,int shift,gfp_t gfp); -void prop_change_shift (struct prop_descriptor *pd,int new_shift); - -/* -* ----- PERCPU ------ -*/ - -struct prop_local_percpu { -/* -* the local events counter -*/ -struct percpu_counter events; - -/* -* snapshot of the last seen global state -*/ -int shift; -unsigned long period; -raw_spinlock_t lock;/* protect the snapshot state */ -}; - -int prop_local_init_percpu (struct prop_local_percpu *pl,gfp_t gfp); -void prop_local_destroy_percpu (struct prop_local_percpu *pl); -void __prop_inc_percpu (struct prop_descriptor *pd,struct prop_local_percpu *pl); -void prop_fraction_percpu (struct prop_descriptor *pd,struct prop_local_percpu *pl, -long *numerator,long *denominator); - -static inline -void prop_inc_percpu (struct prop_descriptor *pd,struct prop_local_percpu *pl) -{ -unsigned long flags; - -local_irq_save (flags); -__prop_inc_percpu (pd, pl); -local_irq_restore (flags); -} - -/* -* Limit the time part in order to ensure there are some bits left for the -* cycle counter and fraction multiply. -*/ -#if BITS_PER_LONG ==32 -#define PROP_MAX_SHIFT (3*BITS_PER_LONG/4) -#else -#define PROP_MAX_SHIFT (BITS_PER_LONG/2) -#endif - -#define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1) -#define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT) - -void __prop_inc_percpu_max (struct prop_descriptor *pd, -struct prop_local_percpu *pl,long frac); - - -/* -* ----- SINGLE ------ -*/ - -struct prop_local_single { -/* -* the local events counter -*/ -unsigned long events; - -/* -* snapshot of the last seen global state -* and a lock protecting this state -*/ -unsigned long period; -int shift; -raw_spinlock_t lock;/* protect the snapshot state */ -}; - -#define INIT_PROP_LOCAL_SINGLE (name) \ -{ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ -} - -int prop_local_init_single (struct prop_local_single *pl); -void prop_local_destroy_single (struct prop_local_single *pl); -void __prop_inc_single (struct prop_descriptor *pd,struct prop_local_single *pl); -void prop_fraction_single (struct prop_descriptor *pd,struct prop_local_single *pl, -long *numerator,long *denominator); - -static inline -void prop_inc_single (struct prop_descriptor *pd,struct prop_local_single *pl) -{ -unsigned long flags; - -local_irq_save (flags); -__prop_inc_single (pd, pl); -local_irq_restore (flags); -} - -#endif /* _LINUX_PROPORTIONS_H */
include/linux/sched.h +0 -1
@@ -40,7 +40,6 @@ struct sched_param {#include <linux/pid.h> #include <linux/percpu.h> #include <linux/topology.h> -#include <linux/proportions.h> #include <linux/seccomp.h> #include <linux/rcupdate.h> #include <linux/rculist.h>
lib/Makefile +1 -1
@@ -23,7 +23,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ rbtree.o radix-tree.o dump_stack.o timerqueue.o\ idr.o int_sqrt.o extable.o \ sha1.o md5.o irq_regs.o argv_split.o \ - proportions.o flex_proportions.o ratelimit.o show_mem.o \ + flex_proportions.o ratelimit.o show_mem.o \ is_single_threaded.o plist.o decompress.o kobject_uevent.o \ earlycpio.o seq_buf.o nmi_backtrace.o
lib/proportions.c deleted +0 -407
407 lines not on this page · raw message