09 Jan, 2009

2 commits

  • The xenfs filesystem exports various interfaces to usermode. Initially
    this exports a file to allow usermode to interact with xenbus/xenstore.

    Traditionally this appeared in /proc/xen. Rather than extending procfs,
    this patch adds a backward-compat mountpoint on /proc/xen, and provides
    a xenfs filesystem which can be mounted there.

    Signed-off-by: Alex Zeffertt
    Signed-off-by: Jeremy Fitzhardinge
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Zeffertt
     
  • no argument named @xbt in xenbus_switch_state(), remove it.

    Signed-off-by: Qinghuang Feng
    Cc: Randy Dunlap
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Qinghuang Feng
     

07 Jan, 2009

1 commit


03 Jan, 2009

1 commit

  • …/git/tip/linux-2.6-tip

    * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
    x86: export vector_used_by_percpu_irq
    x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
    sched: nominate preferred wakeup cpu, fix
    x86: fix lguest used_vectors breakage, -v2
    x86: fix warning in arch/x86/kernel/io_apic.c
    sched: fix warning in kernel/sched.c
    sched: move test_sd_parent() to an SMP section of sched.h
    sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
    sched: activate active load balancing in new idle cpus
    sched: bias task wakeups to preferred semi-idle packages
    sched: nominate preferred wakeup cpu
    sched: favour lower logical cpu number for sched_mc balance
    sched: framework for sched_mc/smt_power_savings=N
    sched: convert BALANCE_FOR_xx_POWER to inline functions
    x86: use possible_cpus=NUM to extend the possible cpus allowed
    x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
    x86: update io_apic.c to the new cpumask code
    x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
    x86: xen: use smp_call_function_many()
    x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
    ...

    Fixed up trivial conflict in kernel/time/tick-sched.c manually

    Linus Torvalds
     

01 Jan, 2009

1 commit

  • …l/git/tip/linux-2.6-tip

    * 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sparseirq: move __weak symbols into separate compilation unit
    sparseirq: work around __weak alias bug
    sparseirq: fix hang with !SPARSE_IRQ
    sparseirq: set lock_class for legacy irq when sparse_irq is selected
    sparseirq: work around compiler optimizing away __weak functions
    sparseirq: fix desc->lock init
    sparseirq: do not printk when migrating IRQ descriptors
    sparseirq: remove duplicated arch_early_irq_init()
    irq: simplify for_each_irq_desc() usage
    proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c
    irq: for_each_irq_desc() move to irqnr.h
    hrtimer: remove #include <linux/irq.h>

    Linus Torvalds
     

31 Dec, 2008

1 commit

  • * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, sparseirq: clean up Kconfig entry
    x86: turn CONFIG_SPARSE_IRQ off by default
    sparseirq: fix numa_migrate_irq_desc dependency and comments
    sparseirq: add kernel-doc notation for new member in irq_desc, -v2
    locking, irq: enclose irq_desc_lock_class in CONFIG_LOCKDEP
    sparseirq, xen: make sure irq_desc is allocated for interrupts
    sparseirq: fix !SMP building, #2
    x86, sparseirq: move irq_desc according to smp_affinity, v7
    proc: enclose desc variable of show_stat() in CONFIG_SPARSE_IRQ
    sparse irqs: add irqnr.h to the user headers list
    sparse irqs: handle !GENIRQ platforms
    sparseirq: fix !SMP && !PCI_MSI && !HT_IRQ build
    sparseirq: fix Alpha build failure
    sparseirq: fix typo in !CONFIG_IO_APIC case
    x86, MSI: pass irq_cfg and irq_desc
    x86: MSI start irq numbering from nr_irqs_gsi
    x86: use NR_IRQS_LEGACY
    sparse irq_desc[] array: core kernel and x86 changes
    genirq: record IRQ_LEVEL in irq_desc[]
    irq.h: remove padding from irq_desc on 64bits

    Linus Torvalds
     

26 Dec, 2008

1 commit


18 Dec, 2008

1 commit


17 Dec, 2008

1 commit


13 Dec, 2008

2 commits

  • Conflicts:

    arch/x86/kernel/io_apic.c
    kernel/sched.c
    kernel/sched_stats.h

    Rusty Russell
     
  • Impact: change existing irq_chip API

    Not much point with gentle transition here: the struct irq_chip's
    setaffinity method signature needs to change.

    Fortunately, not widely used code, but hits a few architectures.

    Note: In irq_select_affinity() I save a temporary in by mangling
    irq_desc[irq].affinity directly. Ingo, does this break anything?

    (Folded in fix from KOSAKI Motohiro)

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Reviewed-by: Grant Grundler
    Acked-by: Ingo Molnar
    Cc: ralf@linux-mips.org
    Cc: grundler@parisc-linux.org
    Cc: jeremy@xensource.com
    Cc: KOSAKI Motohiro

    Rusty Russell
     

08 Dec, 2008

1 commit

  • Impact: new feature

    Problem on distro kernels: irq_desc[NR_IRQS] takes megabytes of RAM with
    NR_CPUS set to large values. The goal is to be able to scale up to much
    larger NR_IRQS value without impacting the (important) common case.

    To solve this, we generalize irq_desc[NR_IRQS] to an (optional) array of
    irq_desc pointers.

    When CONFIG_SPARSE_IRQ=y is used, we use kzalloc_node to get irq_desc,
    this also makes the IRQ descriptors NUMA-local (to the site that calls
    request_irq()).

    This gets rid of the irq_cfg[] static array on x86 as well: irq_cfg now
    uses desc->chip_data for x86 to store irq_cfg.

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     

18 Nov, 2008

1 commit

  • Impact: fix guest kernel crash with CONFIG_XEN_SCRUB_PAGES=y

    Jens noticed that scrub_page() has a buggy unmap of the wrong
    thing. (virtual address instead of page)

    Linus pointed out that the whole scrub_page() code is an unnecessary
    reimplementation of clear_highpage() to begin with.

    Just use clear_highpage() rather than reimplementing it poorly.

    Reported-by: Jens Axboe
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

05 Nov, 2008

1 commit


24 Oct, 2008

3 commits


23 Oct, 2008

1 commit


16 Oct, 2008

4 commits


03 Oct, 2008

1 commit


10 Sep, 2008

1 commit


09 Sep, 2008

1 commit


05 Sep, 2008

2 commits


25 Aug, 2008

2 commits

  • This is the last use of (the deprecated) stop_machine_run in the tree.

    Signed-off-by: Rusty Russell
    Acked-by: Jeremy Fitzhardinge

    Rusty Russell
     
  • Note the changes from 2.6.18-xen CPU hotplugging:

    A vcpu_down request from the remote admin via Xenbus both hotunplugs the
    CPU, and disables it by removing it from the cpu_present map, and removing
    its entry in /sys.

    A vcpu_up request from the remote admin only re-enables the CPU, and does
    not immediately bring the CPU up. A udev event is emitted, which can be
    caught by the user if he wishes to automatically re-up CPUs when available,
    or implement a more complex policy.

    Signed-off-by: Alex Nixon
    Acked-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar

    Alex Nixon
     

21 Aug, 2008

1 commit

  • A spinlock can be interrupted while spinning, so make sure we preserve
    the previous lock of interest if we're taking a lock from within an
    interrupt handler.

    We also need to deal with the case where the blocking path gets
    interrupted between testing to see if the lock is free and actually
    blocking. If we get interrupted there and end up in the state where
    the lock is free but the irq isn't pending, then we'll block
    indefinitely in the hypervisor. This fix is to make sure that any
    nested lock-takers will always leave the irq pending if there's any
    chance the outer lock became free.

    Signed-off-by: Jeremy Fitzhardinge
    Acked-by: Jan Beulich
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

20 Aug, 2008

1 commit

  • There are four operating modes Xen code may find itself running in:
    - native
    - hvm domain
    - pv dom0
    - pv domU

    Clean up predicates for testing for these states to make them more consistent.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Xen-devel
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

31 Jul, 2008

1 commit

  • For some reason I managed to miss a bunch of irq-related functions
    which also need to be compiled without -pg when using ftrace. This
    patch moves them into their own file, and starts a cleanup process
    I've been meaning to do anyway.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Sam Ravnborg
    Cc: "Alex Nixon (Intern)"
    Cc: Eduardo Habkost
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

28 Jul, 2008

2 commits

  • Remove some unused functions:

    balloon_update_driver_allowance
    balloon_release_driver_page
    only used on the (obsolete, removed) flip path in netfront
    alloc_empty_pages_and_pagevec
    free_empty_pages_and_pagevec
    only used in backend drivers; can be reintroduced when needed

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     
  • 1. Set the class so it doesn't clash with the normal memory class
    2. Fix up the sysfs show functions to match the new prototype
    3. Clean up use of memparse

    Signed-off-by: Jeremy Fitzhardinge
    Cc: "viets@work.de"
    Cc: Andi Kleen
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

22 Jul, 2008

1 commit

  • This allow to dynamically generate attributes and share show/store
    functions between attributes. Right now most attributes are generated
    by special macros and lots of duplicated code. With the attribute
    passed it's instead possible to attach some data to the attribute
    and then use that in shared low level functions to do different things.

    I need this for the dynamically generated bank attributes in the x86
    machine check code, but it'll allow some further cleanups.

    I converted all users in tree to the new show/store prototype. It's a single
    huge patch to avoid unbisectable sections.

    Runtime tested: x86-32, x86-64
    Compiled only: ia64, powerpc
    Not compile tested/only grep converted: sh, arm, avr32

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     

21 Jul, 2008

1 commit


18 Jul, 2008

1 commit

  • Today's linux-next build (x86_64 allmodconfig) failed like this:

    drivers/xen/manage.c: In function 'xen_suspend':
    drivers/xen/manage.c:66: error: too few arguments to function 'device_power_up'
    drivers/xen/manage.c: In function 'do_suspend':
    drivers/xen/manage.c:117: error: too few arguments to function 'device_resume'

    Caused by commit 1eede070a59e1cc73da51e1aaa00d9ab86572cfc ("Introduce new
    top level suspend and hibernation callbacks") interacting with new
    usages ...

    Signed-off-by: Stephen Rothwell
    Cc: Jeremy Fitzhardinge
    Acked-by: Rafael J. Wysocki
    Cc: Jesse Barnes
    Signed-off-by: Ingo Molnar

    Stephen Rothwell
     

16 Jul, 2008

2 commits

  • The standard ticket spinlocks are very expensive in a virtual
    environment, because their performance depends on Xen's scheduler
    giving vcpus time in the order that they're supposed to take the
    spinlock.

    This implements a Xen-specific spinlock, which should be much more
    efficient.

    The fast-path is essentially the old Linux-x86 locks, using a single
    lock byte. The locker decrements the byte; if the result is 0, then
    they have the lock. If the lock is negative, then locker must spin
    until the lock is positive again.

    When there's contention, the locker spin for 2^16[*] iterations waiting
    to get the lock. If it fails to get the lock in that time, it adds
    itself to the contention count in the lock and blocks on a per-cpu
    event channel.

    When unlocking the spinlock, the locker looks to see if there's anyone
    blocked waiting for the lock by checking for a non-zero waiter count.
    If there's a waiter, it traverses the per-cpu "lock_spinners"
    variable, which contains which lock each CPU is waiting on. It picks
    one CPU waiting on the lock and sends it an event to wake it up.

    This allows efficient fast-path spinlock operation, while allowing
    spinning vcpus to give up their processor time while waiting for a
    contended lock.

    [*] 2^16 iterations is threshold at which 98% locks have been taken
    according to Thomas Friebel's Xen Summit talk "Preventing Guests from
    Spinning Around". Therefore, we'd expect the lock and unlock slow
    paths will only be entered 2% of the time.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Jens Axboe
    Cc: Peter Zijlstra
    Cc: Christoph Lameter
    Cc: Petr Tesarik
    Cc: Virtualization
    Cc: Xen devel
    Cc: Thomas Friebel
    Cc: Nick Piggin
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     
  • add xen_timer_resume() hook.

    Timer resume should be done after event channel is resumed.
    add xen_arch_resume() hook when ipi becomes usable after resume.
    After resume, some cpu specific resource must be reinitialized
    on ia64 that can't be set by another cpu.

    However available hooks is run once on only one cpu so that ipi has
    to be used.

    During stop_machine_run() ipi can't be used because interrupt is masked.
    So add another hook after stop_machine_run().
    Another approach might be use resume hook which is run by
    device_resume(). However device_resume() may be executed on
    suspend error recovery path.

    So it is necessary to determine whether it is executed on real resume path
    or error recovery path.

    Signed-off-by: Isaku Yamahata
    Cc: Stephen Tweedie
    Cc: Eduardo Habkost
    Cc: Mark McLoughlin
    Signed-off-by: Ingo Molnar

    Isaku Yamahata
     

15 Jul, 2008

1 commit

  • * 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (821 commits)
    x86: make 64bit hpet_set_mapping to use ioremap too, v2
    x86: get x86_phys_bits early
    x86: max_low_pfn_mapped fix #4
    x86: change _node_to_cpumask_ptr to return const ptr
    x86: I/O APIC: remove an IRQ2-mask hack
    x86: fix numaq_tsc_disable calling
    x86, e820: remove end_user_pfn
    x86: max_low_pfn_mapped fix, #3
    x86: max_low_pfn_mapped fix, #2
    x86: max_low_pfn_mapped fix, #1
    x86_64: fix delayed signals
    x86: remove conflicting nx6325 and nx6125 quirks
    x86: Recover timer_ack lost in the merge of the NMI watchdog
    x86: I/O APIC: Never configure IRQ2
    x86: L-APIC: Always fully configure IRQ0
    x86: L-APIC: Set IRQ0 as edge-triggered
    x86: merge dwarf2 headers
    x86: use AS_CFI instead of UNWIND_INFO
    x86: use ignore macro instead of hash comment
    x86: use matching CFI_ENDPROC
    ...

    Linus Torvalds