1. 12 11月, 2009 1 次提交
    • H
      sched: Fix granularity of task_u/stime() · 761b1d26
      Hidetoshi Seto 提交于
      Originally task_s/utime() were designed to return clock_t but
      later changed to return cputime_t by following commit:
      
        commit efe567fc
        Author: Christian Borntraeger <borntraeger@de.ibm.com>
        Date:   Thu Aug 23 15:18:02 2007 +0200
      
      It only changed the type of return value, but not the
      implementation. As the result the granularity of task_s/utime()
      is still that of clock_t, not that of cputime_t.
      
      So using task_s/utime() in __exit_signal() makes values
      accumulated to the signal struct to be rounded and coarse
      grained.
      
      This patch removes casts to clock_t in task_u/stime(), to keep
      granularity of cputime_t over the calculation.
      
      v2:
        Use div_u64() to avoid error "undefined reference to `__udivdi3`"
        on some 32bit systems.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: xiyou.wangcong@gmail.com
      Cc: Spencer Candland <spencer@bluehost.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Stanislaw Gruszka <sgruszka@redhat.com>
      LKML-Reference: <4AFB9029.9000208@jp.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      761b1d26
  2. 11 11月, 2009 1 次提交
  3. 10 11月, 2009 1 次提交
  4. 08 11月, 2009 1 次提交
  5. 05 11月, 2009 3 次提交
    • M
      sched: Fix affinity logic in select_task_rq_fair() · fd210738
      Mike Galbraith 提交于
      Ingo Molnar reported:
      
      [   26.804000] BUG: using smp_processor_id() in preemptible [00000000] code: events/1/10
      [   26.808000] caller is vmstat_update+0x26/0x70
      [   26.812000] Pid: 10, comm: events/1 Not tainted 2.6.32-rc5 #6887
      [   26.816000] Call Trace:
      [   26.820000]  [<c1924a24>] ? printk+0x28/0x3c
      [   26.824000]  [<c13258a0>] debug_smp_processor_id+0xf0/0x110
      [   26.824000] mount used greatest stack depth: 1464 bytes left
      [   26.828000]  [<c111d086>] vmstat_update+0x26/0x70
      [   26.832000]  [<c1086418>] worker_thread+0x188/0x310
      [   26.836000]  [<c10863b7>] ? worker_thread+0x127/0x310
      [   26.840000]  [<c108d310>] ? autoremove_wake_function+0x0/0x60
      [   26.844000]  [<c1086290>] ? worker_thread+0x0/0x310
      [   26.848000]  [<c108cf0c>] kthread+0x7c/0x90
      [   26.852000]  [<c108ce90>] ? kthread+0x0/0x90
      [   26.856000]  [<c100c0a7>] kernel_thread_helper+0x7/0x10
      [   26.860000] BUG: using smp_processor_id() in preemptible [00000000] code: events/1/10
      [   26.864000] caller is vmstat_update+0x3c/0x70
      
      Because this commit:
      
        a1f84a3a: sched: Check for an idle shared cache in select_task_rq_fair()
      
      broke ->cpus_allowed.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: arjan@infradead.org
      Cc: <stable@kernel.org>
      LKML-Reference: <1257415066.12867.1.camel@marge.simson.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fd210738
    • M
      sched: Rate-limit newidle · 1b9508f6
      Mike Galbraith 提交于
      Rate limit newidle to migration_cost. It's a win for all
      stages of sysbench oltp tests.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1b9508f6
    • M
      sched: Check for an idle shared cache in select_task_rq_fair() · a1f84a3a
      Mike Galbraith 提交于
      When waking affine, check for an idle shared cache, and if
      found, wake to that CPU/sibling instead of the waker's CPU.
      
      This improves pgsql+oltp ramp up by roughly 8%. Possibly more
      for other loads, depending on overlap. The trade-off is a
      roughly 1% peak downturn if tasks are truly synchronous.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: <stable@kernel.org>
      LKML-Reference: <1256654138.17752.7.camel@marge.simson.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a1f84a3a
  6. 04 11月, 2009 6 次提交
  7. 26 10月, 2009 2 次提交
  8. 23 10月, 2009 2 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · 964fe080
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
        move virtrng_remove to .devexit.text
        move virtballoon_remove to .devexit.text
        virtio_blk: Revert serial number support
        virtio: let header files include virtio_ids.h
        virtio_blk: revert QUEUE_FLAG_VIRT addition
      964fe080
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 4848490c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
        niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was copied to the head buffer in the Vlan packets case
        KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST
        KS8851: Fix MAC address write order
        KS8851: Add soft reset at probe time
        net: fix section mismatch in fec.c
        net: Fix struct inet_timewait_sock bitfield annotation
        tcp: Try to catch MSG_PEEK bug
        net: Fix IP_MULTICAST_IF
        bluetooth: static lock key fix
        bluetooth: scheduling while atomic bug fix
        tcp: fix TCP_DEFER_ACCEPT retrans calculation
        tcp: reduce SYN-ACK retrans for TCP_DEFER_ACCEPT
        tcp: accept socket after TCP_DEFER_ACCEPT period
        Revert "tcp: fix tcp_defer_accept to consider the timeout"
        AF_UNIX: Fix deadlock on connecting to shutdown socket
        ethoc: clear only pending irqs
        ethoc: inline regs access
        vmxnet3: use dev_dbg, fix build for CONFIG_BLOCK=n
        virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()
        be2net: fix support for PCI hot plug
        ...
      4848490c
  9. 22 10月, 2009 16 次提交
  10. 21 10月, 2009 5 次提交
    • B
      KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST · b6a71bfa
      Ben Dooks 提交于
      In ks8851_set_rx_mode() the case handling IFF_MULTICAST was also setting
      the RXCR1_AE bit by accident. This meant that all unicast frames where
      being accepted by the device. Remove RXCR1_AE from this case.
      
      Note, RXCR1_AE was also masking a problem with setting the MAC address
      properly, so needs to be applied after fixing the MAC write order.
      
      Fixes a bug reported by Doong, Ping of Micrel. This version of the
      patch avoids setting RXCR1_ME for all cases.
      Signed-off-by: NBen Dooks <ben@simtec.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6a71bfa
    • B
      KS8851: Fix MAC address write order · 160d0fad
      Ben Dooks 提交于
      The MAC address register was being written in the wrong order, so add
      a new address macro to convert mac-address byte to register address and
      a ks8851_wrreg8() function to write each byte without having to worry
      about any difficult byte swapping.
      
      Fixes a bug reported by Doong, Ping of Micrel.
      Signed-off-by: NBen Dooks <ben@simtec.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      160d0fad
    • B
      KS8851: Add soft reset at probe time · 57dada68
      Ben Dooks 提交于
      Issue a full soft reset at probe time.
      
      This was reported by Doong Ping of Micrel, but no explanation of why this
      is necessary or what bug it is fixing. Add it as it does not seem to hurt
      the current driver and ensures that the device is in a known state when we
      start setting it up.
      Signed-off-by: NBen Dooks <ben@simtec.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      57dada68
    • S
      net: fix section mismatch in fec.c · 78abcb13
      Steven King 提交于
      fec_enet_init is called by both fec_probe and fec_resume, so it
      shouldn't be marked as __init.
      Signed-off-by: NSteven King <sfking@fdwdc.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78abcb13
    • A
      dnotify: ignore FS_EVENT_ON_CHILD · 94552684
      Andreas Gruenbacher 提交于
      Mask off FS_EVENT_ON_CHILD in dnotify_handle_event().  Otherwise, when there
      is more than one watch on a directory and dnotify_should_send_event()
      succeeds, events with FS_EVENT_ON_CHILD set will trigger all watches and cause
      spurious events.
      
      This case was overlooked in commit e42e2773.
      
      	#define _GNU_SOURCE
      
      	#include <stdio.h>
      	#include <stdlib.h>
      	#include <unistd.h>
      	#include <signal.h>
      	#include <sys/types.h>
      	#include <sys/stat.h>
      	#include <fcntl.h>
      	#include <string.h>
      
      	static void create_event(int s, siginfo_t* si, void* p)
      	{
      		printf("create\n");
      	}
      
      	static void delete_event(int s, siginfo_t* si, void* p)
      	{
      		printf("delete\n");
      	}
      
      	int main (void) {
      		struct sigaction action;
      		char *tmpdir, *file;
      		int fd1, fd2;
      
      		sigemptyset (&action.sa_mask);
      		action.sa_flags = SA_SIGINFO;
      
      		action.sa_sigaction = create_event;
      		sigaction (SIGRTMIN + 0, &action, NULL);
      
      		action.sa_sigaction = delete_event;
      		sigaction (SIGRTMIN + 1, &action, NULL);
      
      	#	define TMPDIR "/tmp/test.XXXXXX"
      		tmpdir = malloc(strlen(TMPDIR) + 1);
      		strcpy(tmpdir, TMPDIR);
      		mkdtemp(tmpdir);
      
      	#	define TMPFILE "/file"
      		file = malloc(strlen(tmpdir) + strlen(TMPFILE) + 1);
      		sprintf(file, "%s/%s", tmpdir, TMPFILE);
      
      		fd1 = open (tmpdir, O_RDONLY);
      		fcntl(fd1, F_SETSIG, SIGRTMIN);
      		fcntl(fd1, F_NOTIFY, DN_MULTISHOT | DN_CREATE);
      
      		fd2 = open (tmpdir, O_RDONLY);
      		fcntl(fd2, F_SETSIG, SIGRTMIN + 1);
      		fcntl(fd2, F_NOTIFY, DN_MULTISHOT | DN_DELETE);
      
      		if (fork()) {
      			/* This triggers a create event */
      			creat(file, 0600);
      			/* This triggers a create and delete event (!) */
      			unlink(file);
      		} else {
      			sleep(1);
      			rmdir(tmpdir);
      		}
      
      		return 0;
      	}
      Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      94552684
  11. 20 10月, 2009 2 次提交