Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135699
b: refs/heads/master
c: 49d2d26
h: refs/heads/master
i:
  135697: 845f065
  135695: 71c53d6
v: v3
  • Loading branch information
Ingo Molnar committed Mar 5, 2009
1 parent b3ec44c commit e4a74ab
Show file tree
Hide file tree
Showing 128 changed files with 1,385 additions and 608 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b67802ea8061393f7bd2d4db934646e76096027c
refs/heads/master: 49d2d266adff27793fed247a2e9e672d59b6ddc6
2 changes: 2 additions & 0 deletions trunk/Documentation/scheduler/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
- this file.
sched-arch.txt
- CPU Scheduler implementation hints for architecture specific code.
sched-coding.txt
- reference for various scheduler-related methods in the O(1) scheduler.
sched-design-CFS.txt
- goals, design and implementation of the Complete Fair Scheduler.
sched-domains.txt
Expand Down
126 changes: 126 additions & 0 deletions trunk/Documentation/scheduler/sched-coding.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
Reference for various scheduler-related methods in the O(1) scheduler
Robert Love <rml@tech9.net>, MontaVista Software


Note most of these methods are local to kernel/sched.c - this is by design.
The scheduler is meant to be self-contained and abstracted away. This document
is primarily for understanding the scheduler, not interfacing to it. Some of
the discussed interfaces, however, are general process/scheduling methods.
They are typically defined in include/linux/sched.h.


Main Scheduling Methods
-----------------------

void load_balance(runqueue_t *this_rq, int idle)
Attempts to pull tasks from one cpu to another to balance cpu usage,
if needed. This method is called explicitly if the runqueues are
imbalanced or periodically by the timer tick. Prior to calling,
the current runqueue must be locked and interrupts disabled.

void schedule()
The main scheduling function. Upon return, the highest priority
process will be active.


Locking
-------

Each runqueue has its own lock, rq->lock. When multiple runqueues need
to be locked, lock acquires must be ordered by ascending &runqueue value.

A specific runqueue is locked via

task_rq_lock(task_t pid, unsigned long *flags)

which disables preemption, disables interrupts, and locks the runqueue pid is
running on. Likewise,

task_rq_unlock(task_t pid, unsigned long *flags)

unlocks the runqueue pid is running on, restores interrupts to their previous
state, and reenables preemption.

The routines

double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)

and

double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2)

safely lock and unlock, respectively, the two specified runqueues. They do
not, however, disable and restore interrupts. Users are required to do so
manually before and after calls.


Values
------

MAX_PRIO
The maximum priority of the system, stored in the task as task->prio.
Lower priorities are higher. Normal (non-RT) priorities range from
MAX_RT_PRIO to (MAX_PRIO - 1).
MAX_RT_PRIO
The maximum real-time priority of the system. Valid RT priorities
range from 0 to (MAX_RT_PRIO - 1).
MAX_USER_RT_PRIO
The maximum real-time priority that is exported to user-space. Should
always be equal to or less than MAX_RT_PRIO. Setting it less allows
kernel threads to have higher priorities than any user-space task.
MIN_TIMESLICE
MAX_TIMESLICE
Respectively, the minimum and maximum timeslices (quanta) of a process.

Data
----

struct runqueue
The main per-CPU runqueue data structure.
struct task_struct
The main per-process data structure.


General Methods
---------------

cpu_rq(cpu)
Returns the runqueue of the specified cpu.
this_rq()
Returns the runqueue of the current cpu.
task_rq(pid)
Returns the runqueue which holds the specified pid.
cpu_curr(cpu)
Returns the task currently running on the given cpu.
rt_task(pid)
Returns true if pid is real-time, false if not.


Process Control Methods
-----------------------

void set_user_nice(task_t *p, long nice)
Sets the "nice" value of task p to the given value.
int setscheduler(pid_t pid, int policy, struct sched_param *param)
Sets the scheduling policy and parameters for the given pid.
int set_cpus_allowed(task_t *p, unsigned long new_mask)
Sets a given task's CPU affinity and migrates it to a proper cpu.
Callers must have a valid reference to the task and assure the
task not exit prematurely. No locks can be held during the call.
set_task_state(tsk, state_value)
Sets the given task's state to the given value.
set_current_state(state_value)
Sets the current task's state to the given value.
void set_tsk_need_resched(struct task_struct *tsk)
Sets need_resched in the given task.
void clear_tsk_need_resched(struct task_struct *tsk)
Clears need_resched in the given task.
void set_need_resched()
Sets need_resched in the current task.
void clear_need_resched()
Clears need_resched in the current task.
int need_resched()
Returns true if need_resched is set in the current task, false
otherwise.
yield()
Place the current process at the end of the runqueue and call schedule.
11 changes: 5 additions & 6 deletions trunk/Documentation/scsi/cxgb3i.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Introduction
============

The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc.
series of products) supports iSCSI acceleration and iSCSI Direct Data Placement
series of products) support iSCSI acceleration and iSCSI Direct Data Placement
(DDP) where the hardware handles the expensive byte touching operations, such
as CRC computation and verification, and direct DMA to the final host memory
destination:
Expand All @@ -31,9 +31,9 @@ destination:
the TCP segments onto the wire. It handles TCP retransmission if
needed.

On receving, S3 h/w recovers the iSCSI PDU by reassembling TCP
On receiving, S3 h/w recovers the iSCSI PDU by reassembling TCP
segments, separating the header and data, calculating and verifying
the digests, then forwards the header to the host. The payload data,
the digests, then forwarding the header to the host. The payload data,
if possible, will be directly placed into the pre-posted host DDP
buffer. Otherwise, the payload data will be sent to the host too.

Expand Down Expand Up @@ -68,9 +68,8 @@ The following steps need to be taken to accelerates the open-iscsi initiator:
sure the ip address is unique in the network.

3. edit /etc/iscsi/iscsid.conf
The default setting for MaxRecvDataSegmentLength (131072) is too big,
replace "node.conn[0].iscsi.MaxRecvDataSegmentLength" to be a value no
bigger than 15360 (for example 8192):
The default setting for MaxRecvDataSegmentLength (131072) is too big;
replace with a value no bigger than 15360 (for example 8192):

node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192

Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ S: Maintained

ISDN SUBSYSTEM
P: Karsten Keil
M: kkeil@suse.de
M: isdn@linux-pingi.de
L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
W: http://www.isdn4linux.de
T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 29
EXTRAVERSION = -rc6
EXTRAVERSION = -rc7
NAME = Erotic Pickled Herring

# *DOCUMENTATION*
Expand Down
13 changes: 7 additions & 6 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,13 @@ static void __init cacheid_init(void)
unsigned int cachetype = read_cpuid_cachetype();
unsigned int arch = cpu_architecture();

if (arch >= CPU_ARCH_ARMv7) {
cacheid = CACHEID_VIPT_NONALIASING;
if ((cachetype & (3 << 14)) == 1 << 14)
cacheid |= CACHEID_ASID_TAGGED;
} else if (arch >= CPU_ARCH_ARMv6) {
if (cachetype & (1 << 23))
if (arch >= CPU_ARCH_ARMv6) {
if ((cachetype & (7 << 29)) == 4 << 29) {
/* ARMv7 register format */
cacheid = CACHEID_VIPT_NONALIASING;
if ((cachetype & (3 << 14)) == 1 << 14)
cacheid |= CACHEID_ASID_TAGGED;
} else if (cachetype & (1 << 23))
cacheid = CACHEID_VIPT_ALIASING;
else
cacheid = CACHEID_VIPT_NONALIASING;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ static int at91_pm_enter(suspend_state_t state)
at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));

error:
sdram_selfrefresh_disable();
target_state = PM_SUSPEND_ON;
at91_irq_resume();
at91_gpio_resume();
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mm/abort-ev6.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ENTRY(v6_early_abort)
#ifdef CONFIG_CPU_32v6K
clrex
#else
strex r0, r1, [sp] @ Clear the exclusive monitor
sub r1, sp, #4 @ Get unused stack location
strex r0, r1, [r1] @ Clear the exclusive monitor
#endif
mrc p15, 0, r1, c5, c0, 0 @ get FSR
mrc p15, 0, r0, c6, c0, 0 @ get FAR
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-s3c64xx/irq-eint.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void s3c_irq_eint_unmask(unsigned int irq)
u32 mask;

mask = __raw_readl(S3C64XX_EINT0MASK);
mask |= eint_irq_to_bit(irq);
mask &= ~eint_irq_to_bit(irq);
__raw_writel(mask, S3C64XX_EINT0MASK);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/mips/include/asm/seccomp.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef __ASM_SECCOMP_H

#include <linux/thread_info.h>
#include <linux/unistd.h>

#define __NR_seccomp_read __NR_read
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,10 @@ struct compat_shmid64_ds {
compat_ulong_t __unused6;
};

static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}

#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_COMPAT_H */
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/include/asm/seccomp.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#ifndef _ASM_POWERPC_SECCOMP_H
#define _ASM_POWERPC_SECCOMP_H

#ifdef __KERNEL__
#include <linux/thread_info.h>
#endif

#include <linux/unistd.h>

#define __NR_seccomp_read __NR_read
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/crypto/aes_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ static void __exit aes_s390_fini(void)
module_init(aes_s390_init);
module_exit(aes_s390_fini);

MODULE_ALIAS("aes");
MODULE_ALIAS("aes-all");

MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
MODULE_LICENSE("GPL");
5 changes: 5 additions & 0 deletions trunk/arch/sparc/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,9 @@ struct compat_shmid64_ds {
unsigned int __unused2;
};

static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}

#endif /* _ASM_SPARC64_COMPAT_H */
6 changes: 0 additions & 6 deletions trunk/arch/sparc/include/asm/seccomp.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#ifndef _ASM_SECCOMP_H

#include <linux/thread_info.h> /* already defines TIF_32BIT */

#ifndef TIF_32BIT
#error "unexpected TIF_32BIT on sparc64"
#endif

#include <linux/unistd.h>

#define __NR_seccomp_read __NR_read
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86/include/asm/seccomp_32.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#ifndef _ASM_X86_SECCOMP_32_H
#define _ASM_X86_SECCOMP_32_H

#include <linux/thread_info.h>

#ifdef TIF_32BIT
#error "unexpected TIF_32BIT on i386"
#endif

#include <linux/unistd.h>

#define __NR_seccomp_read __NR_read
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/x86/include/asm/seccomp_64.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#ifndef _ASM_X86_SECCOMP_64_H
#define _ASM_X86_SECCOMP_64_H

#include <linux/thread_info.h>

#ifdef TIF_32BIT
#error "unexpected TIF_32BIT on x86_64"
#else
#define TIF_32BIT TIF_IA32
#endif

#include <linux/unistd.h>
#include <asm/ia32_unistd.h>

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
#ifdef CONFIG_X86_32
# define IS_IA32 1
#elif defined CONFIG_IA32_EMULATION
# define IS_IA32 test_thread_flag(TIF_IA32)
# define IS_IA32 is_compat_task()
#else
# define IS_IA32 0
#endif
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
pos = start_pfn << PAGE_SHIFT;
end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
<< (PMD_SHIFT - PAGE_SHIFT);
if (end_pfn > (end >> PAGE_SHIFT))
end_pfn = end >> PAGE_SHIFT;
if (start_pfn < end_pfn) {
nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
pos = end_pfn << PAGE_SHIFT;
Expand Down
15 changes: 4 additions & 11 deletions trunk/arch/x86/mm/iomap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,16 @@
#include <asm/pat.h>
#include <linux/module.h>

#ifdef CONFIG_X86_PAE
int
is_io_mapping_possible(resource_size_t base, unsigned long size)
{
return 1;
}
#else
int
is_io_mapping_possible(resource_size_t base, unsigned long size)
int is_io_mapping_possible(resource_size_t base, unsigned long size)
{
#ifndef CONFIG_X86_PAE
/* There is no way to map greater than 1 << 32 address without PAE */
if (base + size > 0x100000000ULL)
return 0;

#endif
return 1;
}
#endif
EXPORT_SYMBOL_GPL(is_io_mapping_possible);

/* Map 'pfn' using fixed map 'type' and protections 'prot'
*/
Expand Down
Loading

0 comments on commit e4a74ab

Please sign in to comment.