Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198378
b: refs/heads/master
c: 51e618c
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 25, 2010
1 parent 717d8b8 commit a7a0c5f
Show file tree
Hide file tree
Showing 199 changed files with 7,280 additions and 2,406 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: bb2fd8a844d3a9209599b5fb694b30ac46a56ef0
refs/heads/master: 51e618c357b39597b474165c5d17067afe8f16a6
7 changes: 7 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-devices-node
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
What: /sys/devices/system/node/nodeX/compact
Date: February 2010
Contact: Mel Gorman <mel@csn.ul.ie>
Description:
When this file is written to, all memory within that node
will be compacted. When it completes, memory will be freed
into blocks which have as many contiguous pages as possible
10 changes: 9 additions & 1 deletion trunk/Documentation/filesystems/tmpfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,19 @@ NodeList format is a comma-separated list of decimal numbers and ranges,
a range being two hyphen-separated decimal numbers, the smallest and
largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15

A memory policy with a valid NodeList will be saved, as specified, for
use at file creation time. When a task allocates a file in the file
system, the mount option memory policy will be applied with a NodeList,
if any, modified by the calling task's cpuset constraints
[See Documentation/cgroups/cpusets.txt] and any optional flags, listed
below. If the resulting NodeLists is the empty set, the effective memory
policy for the file will revert to "default" policy.

NUMA memory allocation policies have optional flags that can be used in
conjunction with their modes. These optional flags can be specified
when tmpfs is mounted by appending them to the mode before the NodeList.
See Documentation/vm/numa_memory_policy.txt for a list of all available
memory allocation policy mode flags.
memory allocation policy mode flags and their effect on memory policy.

=static is equivalent to MPOL_F_STATIC_NODES
=relative is equivalent to MPOL_F_RELATIVE_NODES
Expand Down
816 changes: 816 additions & 0 deletions trunk/Documentation/filesystems/xfs-delayed-logging-design.txt

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions trunk/Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ files can be found in mm/swap.c.
Currently, these files are in /proc/sys/vm:

- block_dump
- compact_memory
- dirty_background_bytes
- dirty_background_ratio
- dirty_bytes
- dirty_expire_centisecs
- dirty_ratio
- dirty_writeback_centisecs
- drop_caches
- extfrag_threshold
- hugepages_treat_as_movable
- hugetlb_shm_group
- laptop_mode
Expand Down Expand Up @@ -64,6 +66,15 @@ information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.

==============================================================

compact_memory

Available only when CONFIG_COMPACTION is set. When 1 is written to the file,
all zones are compacted such that free memory is available in contiguous
blocks where possible. This can be important for example in the allocation of
huge pages although processes will also directly compact memory as required.

==============================================================

dirty_background_bytes

Contains the amount of dirty memory at which the pdflush background writeback
Expand Down Expand Up @@ -139,6 +150,20 @@ user should run `sync' first.

==============================================================

extfrag_threshold

This parameter affects whether the kernel will compact memory or direct
reclaim to satisfy a high-order allocation. /proc/extfrag_index shows what
the fragmentation index for each order is in each zone in the system. Values
tending towards 0 imply allocations would fail due to lack of memory,
values towards 1000 imply failures are due to fragmentation and -1 implies
that the allocation will succeed as long as watermarks are met.

The kernel will not compact memory in a zone if the
fragmentation index is <= extfrag_threshold. The default value is 500.

==============================================================

hugepages_treat_as_movable

This parameter is only useful when kernelcore= is specified at boot time to
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/alpha/math-emu/sfp-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,3 @@ extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
#define UDIV_NEEDS_NORMALIZATION 1

#define abort() goto bad_insn

#ifndef __LITTLE_ENDIAN
#define __LITTLE_ENDIAN -1
#endif
#define __BYTE_ORDER __LITTLE_ENDIAN
4 changes: 4 additions & 0 deletions trunk/arch/arm/plat-samsung/include/plat/regs-rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#define S3C2410_RTCCON_CLKSEL (1<<1)
#define S3C2410_RTCCON_CNTSEL (1<<2)
#define S3C2410_RTCCON_CLKRST (1<<3)
#define S3C64XX_RTCCON_TICEN (1<<8)

#define S3C64XX_RTCCON_TICMSK (0xF<<7)
#define S3C64XX_RTCCON_TICSHT (7)

#define S3C2410_TICNT S3C2410_RTCREG(0x44)
#define S3C2410_TICNT_ENABLE (1<<7)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/frv/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#define L1_CACHE_SHIFT (CONFIG_FRV_L1_CACHE_SHIFT)
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)

#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES

#define __cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
#define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))

Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/frv/include/asm/gdb-stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#ifndef __ASM_GDB_STUB_H
#define __ASM_GDB_STUB_H

#undef GDBSTUB_DEBUG_IO
#undef GDBSTUB_DEBUG_PROTOCOL

#include <asm/ptrace.h>
Expand Down Expand Up @@ -108,6 +109,12 @@ extern void gdbstub_printk(const char *fmt, ...);
extern void debug_to_serial(const char *p, int n);
extern void console_set_baud(unsigned baud);

#ifdef GDBSTUB_DEBUG_IO
#define gdbstub_io(FMT,...) gdbstub_printk(FMT, ##__VA_ARGS__)
#else
#define gdbstub_io(FMT,...) ({ 0; })
#endif

#ifdef GDBSTUB_DEBUG_PROTOCOL
#define gdbstub_proto(FMT,...) gdbstub_printk(FMT,##__VA_ARGS__)
#else
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/frv/kernel/gdb-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ int gdbstub_rx_char(unsigned char *_ch, int nonblock)
return -EINTR;
}
else if (st & (UART_LSR_FE|UART_LSR_OE|UART_LSR_PE)) {
gdbstub_proto("### GDB Rx Error (st=%02x) ###\n",st);
gdbstub_io("### GDB Rx Error (st=%02x) ###\n",st);
return -EIO;
}
else {
gdbstub_proto("### GDB Rx %02x (st=%02x) ###\n",ch,st);
gdbstub_io("### GDB Rx %02x (st=%02x) ###\n",ch,st);
*_ch = ch & 0x7f;
return 0;
}
Expand Down
61 changes: 61 additions & 0 deletions trunk/arch/frv/kernel/gdb-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,44 @@ void gdbstub_get_mmu_state(void)

} /* end gdbstub_get_mmu_state() */

/*
* handle general query commands of the form 'qXXXXX'
*/
static void gdbstub_handle_query(void)
{
if (strcmp(input_buffer, "qAttached") == 0) {
/* return current thread ID */
sprintf(output_buffer, "1");
return;
}

if (strcmp(input_buffer, "qC") == 0) {
/* return current thread ID */
sprintf(output_buffer, "QC 0");
return;
}

if (strcmp(input_buffer, "qOffsets") == 0) {
/* return relocation offset of text and data segments */
sprintf(output_buffer, "Text=0;Data=0;Bss=0");
return;
}

if (strcmp(input_buffer, "qSymbol::") == 0) {
sprintf(output_buffer, "OK");
return;
}

if (strcmp(input_buffer, "qSupported") == 0) {
/* query of supported features */
sprintf(output_buffer, "PacketSize=%u;ReverseContinue-;ReverseStep-",
sizeof(input_buffer));
return;
}

gdbstub_strcpy(output_buffer,"E01");
}

/*****************************************************************************/
/*
* handle event interception and GDB remote protocol processing
Expand Down Expand Up @@ -1840,6 +1878,10 @@ void gdbstub(int sigval)
case 'k' :
goto done; /* just continue */

/* detach */
case 'D':
gdbstub_strcpy(output_buffer, "OK");
break;

/* reset the whole machine (FIXME: system dependent) */
case 'r':
Expand All @@ -1852,6 +1894,14 @@ void gdbstub(int sigval)
__debug_status.dcr |= DCR_SE;
goto done;

/* extended command */
case 'v':
if (strcmp(input_buffer, "vCont?") == 0) {
output_buffer[0] = 0;
break;
}
goto unsupported_cmd;

/* set baud rate (bBB) */
case 'b':
ptr = &input_buffer[1];
Expand Down Expand Up @@ -1923,8 +1973,19 @@ void gdbstub(int sigval)
gdbstub_strcpy(output_buffer,"OK");
break;

/* Thread-setting packet */
case 'H':
gdbstub_strcpy(output_buffer, "OK");
break;

case 'q':
gdbstub_handle_query();
break;

default:
unsupported_cmd:
gdbstub_proto("### GDB Unsupported Cmd '%s'\n",input_buffer);
gdbstub_strcpy(output_buffer,"E01");
break;
}

Expand Down
158 changes: 1 addition & 157 deletions trunk/arch/mn10300/include/asm/atomic.h
Original file line number Diff line number Diff line change
@@ -1,157 +1 @@
/* MN10300 Atomic counter operations
*
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence
* as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version.
*/
#ifndef _ASM_ATOMIC_H
#define _ASM_ATOMIC_H

#ifdef CONFIG_SMP
#error not SMP safe
#endif

/*
* Atomic operations that C can't guarantee us. Useful for
* resource counting etc..
*/

#define ATOMIC_INIT(i) { (i) }

#ifdef __KERNEL__

/**
* atomic_read - read atomic variable
* @v: pointer of type atomic_t
*
* Atomically reads the value of @v. Note that the guaranteed
* useful range of an atomic_t is only 24 bits.
*/
#define atomic_read(v) (*(volatile int *)&(v)->counter)

/**
* atomic_set - set atomic variable
* @v: pointer of type atomic_t
* @i: required value
*
* Atomically sets the value of @v to @i. Note that the guaranteed
* useful range of an atomic_t is only 24 bits.
*/
#define atomic_set(v, i) (((v)->counter) = (i))

#include <asm/system.h>

/**
* atomic_add_return - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic_t
*
* Atomically adds @i to @v and returns the result
* Note that the guaranteed useful range of an atomic_t is only 24 bits.
*/
static inline int atomic_add_return(int i, atomic_t *v)
{
unsigned long flags;
int temp;

local_irq_save(flags);
temp = v->counter;
temp += i;
v->counter = temp;
local_irq_restore(flags);

return temp;
}

/**
* atomic_sub_return - subtract integer from atomic variable
* @i: integer value to subtract
* @v: pointer of type atomic_t
*
* Atomically subtracts @i from @v and returns the result
* Note that the guaranteed useful range of an atomic_t is only 24 bits.
*/
static inline int atomic_sub_return(int i, atomic_t *v)
{
unsigned long flags;
int temp;

local_irq_save(flags);
temp = v->counter;
temp -= i;
v->counter = temp;
local_irq_restore(flags);

return temp;
}

static inline int atomic_add_negative(int i, atomic_t *v)
{
return atomic_add_return(i, v) < 0;
}

static inline void atomic_add(int i, atomic_t *v)
{
atomic_add_return(i, v);
}

static inline void atomic_sub(int i, atomic_t *v)
{
atomic_sub_return(i, v);
}

static inline void atomic_inc(atomic_t *v)
{
atomic_add_return(1, v);
}

static inline void atomic_dec(atomic_t *v)
{
atomic_sub_return(1, v);
}

#define atomic_dec_return(v) atomic_sub_return(1, (v))
#define atomic_inc_return(v) atomic_add_return(1, (v))

#define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0)
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)

#define atomic_add_unless(v, a, u) \
({ \
int c, old; \
c = atomic_read(v); \
while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
c = old; \
c != (u); \
})

#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)

static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
{
unsigned long flags;

mask = ~mask;
local_irq_save(flags);
*addr &= mask;
local_irq_restore(flags);
}

#define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))

/* Atomic operations are already serializing on MN10300??? */
#define smp_mb__before_atomic_dec() barrier()
#define smp_mb__after_atomic_dec() barrier()
#define smp_mb__before_atomic_inc() barrier()
#define smp_mb__after_atomic_inc() barrier()

#include <asm-generic/atomic-long.h>

#endif /* __KERNEL__ */
#endif /* _ASM_ATOMIC_H */
#include <asm-generic/atomic.h>
Loading

0 comments on commit a7a0c5f

Please sign in to comment.