Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263883
b: refs/heads/master
c: f39aa30
h: refs/heads/master
i:
  263881: 47170d1
  263879: ffab23c
v: v3
  • Loading branch information
Ming Lei authored and Stefan Richter committed Sep 16, 2011
1 parent ba07e12 commit a07d35d
Show file tree
Hide file tree
Showing 118 changed files with 1,145 additions and 1,188 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: 4be0ed42c56c84d980a851f0bdd0fc20b45c3944
refs/heads/master: f39aa30d7741f40ad964341e9243dbbd7f8ff057
13 changes: 0 additions & 13 deletions trunk/Documentation/ABI/testing/sysfs-class-scsi_host

This file was deleted.

85 changes: 84 additions & 1 deletion trunk/Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ will be charged as a new owner of it.

5.2 stat file

memory.stat file includes following statistics
5.2.1 memory.stat file includes following statistics

# per-memory cgroup local status
cache - # of bytes of page cache memory.
Expand Down Expand Up @@ -438,6 +438,89 @@ Note:
file_mapped is accounted only when the memory cgroup is owner of page
cache.)

5.2.2 memory.vmscan_stat

memory.vmscan_stat includes statistics information for memory scanning and
freeing, reclaiming. The statistics shows memory scanning information since
memory cgroup creation and can be reset to 0 by writing 0 as

#echo 0 > ../memory.vmscan_stat

This file contains following statistics.

[param]_[file_or_anon]_pages_by_[reason]_[under_heararchy]
[param]_elapsed_ns_by_[reason]_[under_hierarchy]

For example,

scanned_file_pages_by_limit indicates the number of scanned
file pages at vmscan.

Now, 3 parameters are supported

scanned - the number of pages scanned by vmscan
rotated - the number of pages activated at vmscan
freed - the number of pages freed by vmscan

If "rotated" is high against scanned/freed, the memcg seems busy.

Now, 2 reason are supported

limit - the memory cgroup's limit
system - global memory pressure + softlimit
(global memory pressure not under softlimit is not handled now)

When under_hierarchy is added in the tail, the number indicates the
total memcg scan of its children and itself.

elapsed_ns is a elapsed time in nanosecond. This may include sleep time
and not indicates CPU usage. So, please take this as just showing
latency.

Here is an example.

# cat /cgroup/memory/A/memory.vmscan_stat
scanned_pages_by_limit 9471864
scanned_anon_pages_by_limit 6640629
scanned_file_pages_by_limit 2831235
rotated_pages_by_limit 4243974
rotated_anon_pages_by_limit 3971968
rotated_file_pages_by_limit 272006
freed_pages_by_limit 2318492
freed_anon_pages_by_limit 962052
freed_file_pages_by_limit 1356440
elapsed_ns_by_limit 351386416101
scanned_pages_by_system 0
scanned_anon_pages_by_system 0
scanned_file_pages_by_system 0
rotated_pages_by_system 0
rotated_anon_pages_by_system 0
rotated_file_pages_by_system 0
freed_pages_by_system 0
freed_anon_pages_by_system 0
freed_file_pages_by_system 0
elapsed_ns_by_system 0
scanned_pages_by_limit_under_hierarchy 9471864
scanned_anon_pages_by_limit_under_hierarchy 6640629
scanned_file_pages_by_limit_under_hierarchy 2831235
rotated_pages_by_limit_under_hierarchy 4243974
rotated_anon_pages_by_limit_under_hierarchy 3971968
rotated_file_pages_by_limit_under_hierarchy 272006
freed_pages_by_limit_under_hierarchy 2318492
freed_anon_pages_by_limit_under_hierarchy 962052
freed_file_pages_by_limit_under_hierarchy 1356440
elapsed_ns_by_limit_under_hierarchy 351386416101
scanned_pages_by_system_under_hierarchy 0
scanned_anon_pages_by_system_under_hierarchy 0
scanned_file_pages_by_system_under_hierarchy 0
rotated_pages_by_system_under_hierarchy 0
rotated_anon_pages_by_system_under_hierarchy 0
rotated_file_pages_by_system_under_hierarchy 0
freed_pages_by_system_under_hierarchy 0
freed_anon_pages_by_system_under_hierarchy 0
freed_file_pages_by_system_under_hierarchy 0
elapsed_ns_by_system_under_hierarchy 0

5.3 swappiness

Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
Expand Down
9 changes: 3 additions & 6 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2086,12 +2086,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Override pmtimer IOPort with a hex value.
e.g. pmtmr=0x508

pnp.debug=1 [PNP]
Enable PNP debug messages (depends on the
CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time
via /sys/module/pnp/parameters/debug. We always show
current resource usage; turning this on also shows
possible settings and some assignment information.
pnp.debug [PNP]
Enable PNP debug messages. This depends on the
CONFIG_PNP_DEBUG_MESSAGES option.

pnpacpi= [ACPI]
{ off }
Expand Down
17 changes: 1 addition & 16 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3262,17 +3262,6 @@ F: Documentation/input/multi-touch-protocol.txt
F: drivers/input/input-mt.c
K: \b(ABS|SYN)_MT_

INTEL C600 SERIES SAS CONTROLLER DRIVER
M: Intel SCU Linux support <intel-linux-scu@intel.com>
M: Dan Williams <dan.j.williams@intel.com>
M: Dave Jiang <dave.jiang@intel.com>
M: Ed Nadolski <edmund.nadolski@intel.com>
L: linux-scsi@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git
S: Maintained
F: drivers/scsi/isci/
F: firmware/isci/

INTEL IDLE DRIVER
M: Len Brown <lenb@kernel.org>
L: linux-pm@lists.linux-foundation.org
Expand Down Expand Up @@ -4785,7 +4774,7 @@ F: drivers/net/wireless/orinoco/

OSD LIBRARY and FILESYSTEM
M: Boaz Harrosh <bharrosh@panasas.com>
M: Benny Halevy <bhalevy@tonian.com>
M: Benny Halevy <bhalevy@panasas.com>
L: osd-dev@open-osd.org
W: http://open-osd.org
T: git git://git.open-osd.org/open-osd.git
Expand Down Expand Up @@ -7211,9 +7200,6 @@ W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
S: Supported
F: Documentation/hwmon/wm83??
F: drivers/leds/leds-wm83*.c
F: drivers/input/misc/wm831x-on.c
F: drivers/input/touchscreen/wm831x-ts.c
F: drivers/input/touchscreen/wm97*.c
F: drivers/mfd/wm8*.c
F: drivers/power/wm83*.c
F: drivers/rtc/rtc-wm83*.c
Expand All @@ -7223,7 +7209,6 @@ F: drivers/watchdog/wm83*_wdt.c
F: include/linux/mfd/wm831x/
F: include/linux/mfd/wm8350/
F: include/linux/mfd/wm8400*
F: include/linux/wm97xx.h
F: include/sound/wm????.h
F: sound/soc/codecs/wm*

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ config GENERIC_CMOS_UPDATE
def_bool y

config GENERIC_GPIO
bool
def_bool y

config ZONE_DMA
bool
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/um/Kconfig.x86
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ config CMPXCHG_LOCAL
bool
default n

config CMPXCHG_DOUBLE
bool
default n

source "arch/x86/Kconfig.cpu"

endmenu
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)
KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
-Din6addr_loopback=kernel_in6addr_loopback \
-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
-Din6addr_any=kernel_in6addr_any

KBUILD_AFLAGS += $(ARCH_INCLUDE)

Expand Down
61 changes: 25 additions & 36 deletions trunk/arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
* is done under a spinlock. Checking whether the device is in use is
* line->tty->count > 1, also under the spinlock.
*
* line->count serves to decide whether the device should be enabled or
* disabled on the host. If it's equal to 0, then we are doing the
* tty->count serves to decide whether the device should be enabled or
* disabled on the host. If it's equal to 1, then we are doing the
* first open or last close. Otherwise, open and close just return.
*/

Expand All @@ -414,16 +414,16 @@ int line_open(struct line *lines, struct tty_struct *tty)
goto out_unlock;

err = 0;
if (line->count++)
if (tty->count > 1)
goto out_unlock;

BUG_ON(tty->driver_data);
spin_unlock(&line->count_lock);

tty->driver_data = line;
line->tty = tty;

spin_unlock(&line->count_lock);
err = enable_chan(line);
if (err) /* line_close() will be called by our caller */
if (err)
return err;

INIT_DELAYED_WORK(&line->task, line_timer_cb);
Expand All @@ -436,7 +436,7 @@ int line_open(struct line *lines, struct tty_struct *tty)
chan_window_size(&line->chan_list, &tty->winsize.ws_row,
&tty->winsize.ws_col);

return 0;
return err;

out_unlock:
spin_unlock(&line->count_lock);
Expand All @@ -460,16 +460,17 @@ void line_close(struct tty_struct *tty, struct file * filp)
flush_buffer(line);

spin_lock(&line->count_lock);
BUG_ON(!line->valid);
if (!line->valid)
goto out_unlock;

if (--line->count)
if (tty->count > 1)
goto out_unlock;

spin_unlock(&line->count_lock);

line->tty = NULL;
tty->driver_data = NULL;

spin_unlock(&line->count_lock);

if (line->sigio) {
unregister_winch(tty);
line->sigio = 0;
Expand Down Expand Up @@ -497,7 +498,7 @@ static int setup_one_line(struct line *lines, int n, char *init, int init_prio,

spin_lock(&line->count_lock);

if (line->count) {
if (line->tty != NULL) {
*error_out = "Device is already open";
goto out;
}
Expand Down Expand Up @@ -721,53 +722,41 @@ struct winch {
int pid;
struct tty_struct *tty;
unsigned long stack;
struct work_struct work;
};

static void __free_winch(struct work_struct *work)
static void free_winch(struct winch *winch, int free_irq_ok)
{
struct winch *winch = container_of(work, struct winch, work);
free_irq(WINCH_IRQ, winch);
if (free_irq_ok)
free_irq(WINCH_IRQ, winch);

list_del(&winch->list);

if (winch->pid != -1)
os_kill_process(winch->pid, 1);
if (winch->fd != -1)
os_close_file(winch->fd);
if (winch->stack != 0)
free_stack(winch->stack, 0);
kfree(winch);
}

static void free_winch(struct winch *winch)
{
int fd = winch->fd;
winch->fd = -1;
if (fd != -1)
os_close_file(fd);
list_del(&winch->list);
__free_winch(&winch->work);
}

static irqreturn_t winch_interrupt(int irq, void *data)
{
struct winch *winch = data;
struct tty_struct *tty;
struct line *line;
int fd = winch->fd;
int err;
char c;

if (fd != -1) {
err = generic_read(fd, &c, NULL);
if (winch->fd != -1) {
err = generic_read(winch->fd, &c, NULL);
if (err < 0) {
if (err != -EAGAIN) {
winch->fd = -1;
list_del(&winch->list);
os_close_file(fd);
printk(KERN_ERR "winch_interrupt : "
"read failed, errno = %d\n", -err);
printk(KERN_ERR "fd %d is losing SIGWINCH "
"support\n", winch->tty_fd);
INIT_WORK(&winch->work, __free_winch);
schedule_work(&winch->work);
free_winch(winch, 0);
return IRQ_HANDLED;
}
goto out;
Expand Down Expand Up @@ -839,7 +828,7 @@ static void unregister_winch(struct tty_struct *tty)
list_for_each_safe(ele, next, &winch_handlers) {
winch = list_entry(ele, struct winch, list);
if (winch->tty == tty) {
free_winch(winch);
free_winch(winch, 1);
break;
}
}
Expand All @@ -855,7 +844,7 @@ static void winch_cleanup(void)

list_for_each_safe(ele, next, &winch_handlers) {
winch = list_entry(ele, struct winch, list);
free_winch(winch);
free_winch(winch, 1);
}

spin_unlock(&winch_handler_lock);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/drivers/xterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ static int xterm_open(int input, int output, int primary, void *d,
err = -errno;
printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
errno);
close(fd);
return err;
}
close(fd);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/um/include/asm/ptrace-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ extern long subarch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data);
extern unsigned long getreg(struct task_struct *child, int regno);
extern int putreg(struct task_struct *child, int regno, unsigned long value);
extern int get_fpregs(struct user_i387_struct __user *buf,
struct task_struct *child);
extern int set_fpregs(struct user_i387_struct __user *buf,
struct task_struct *child);

extern int arch_copy_tls(struct task_struct *new);
extern void clear_flushed_tls(struct task_struct *task);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/include/shared/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct line_driver {
struct line {
struct tty_struct *tty;
spinlock_t count_lock;
unsigned long count;
int valid;

char *init_str;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/include/shared/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern int restore_fpx_registers(int pid, unsigned long *fp_regs);
extern int save_registers(int pid, struct uml_pt_regs *regs);
extern int restore_registers(int pid, struct uml_pt_regs *regs);
extern int init_registers(int pid);
extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
extern void get_safe_registers(unsigned long *regs);
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
extern int get_fp_registers(int pid, unsigned long *regs);
extern int put_fp_registers(int pid, unsigned long *regs);
Expand Down
Loading

0 comments on commit a07d35d

Please sign in to comment.