27 May, 2011

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem:
    xen: cleancache shim to Xen Transcendent Memory
    ocfs2: add cleancache support
    ext4: add cleancache support
    btrfs: add cleancache support
    ext3: add cleancache support
    mm/fs: add hooks to support cleancache
    mm: cleancache core ops functions and config
    fs: add field to superblock to support cleancache
    mm/fs: cleancache documentation

    Fix up trivial conflict in fs/btrfs/extent_io.c due to includes

    Linus Torvalds
     
  • This patch provides a shim between the kernel-internal cleancache
    API (see Documentation/mm/cleancache.txt) and the Xen Transcendent
    Memory ABI (see http://oss.oracle.com/projects/tmem).

    Xen tmem provides "hypervisor RAM" as an ephemeral page-oriented
    pseudo-RAM store for cleancache pages, shared cleancache pages,
    and frontswap pages. Tmem provides enterprise-quality concurrency,
    full save/restore and live migration support, compression
    and deduplication.

    A presentation showing up to 8% faster performance and up to 52%
    reduction in sectors read on a kernel compile workload, despite
    aggressive in-kernel page reclamation ("self-ballooning") can be
    found at:

    http://oss.oracle.com/projects/tmem/dist/documentation/presentations/TranscendentMemoryXenSummit2010.pdf

    Signed-off-by: Dan Magenheimer
    Reviewed-by: Jeremy Fitzhardinge
    Cc: Konrad Rzeszutek Wilk
    Cc: Matthew Wilcox
    Cc: Nick Piggin
    Cc: Mel Gorman
    Cc: Rik Van Riel
    Cc: Jan Beulich
    Cc: Chris Mason
    Cc: Andreas Dilger
    Cc: Ted Ts'o
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Nitin Gupta

    Dan Magenheimer
     

24 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

20 May, 2011

4 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: (34 commits)
    PM: Introduce generic prepare and complete callbacks for subsystems
    PM: Allow drivers to allocate memory from .prepare() callbacks safely
    PM: Remove CONFIG_PM_VERBOSE
    Revert "PM / Hibernate: Reduce autotuned default image size"
    PM / Hibernate: Add sysfs knob to control size of memory for drivers
    PM / Wakeup: Remove useless synchronize_rcu() call
    kmod: always provide usermodehelper_disable()
    PM / ACPI: Remove acpi_sleep=s4_nonvs
    PM / Wakeup: Fix build warning related to the "wakeup" sysfs file
    PM: Print a warning if firmware is requested when tasks are frozen
    PM / Runtime: Rework runtime PM handling during driver removal
    Freezer: Use SMP barriers
    PM / Suspend: Do not ignore error codes returned by suspend_enter()
    PM: Fix build issue in clock_ops.c for CONFIG_PM_RUNTIME unset
    PM: Revert "driver core: platform_bus: allow runtime override of dev_pm_ops"
    OMAP1 / PM: Use generic clock manipulation routines for runtime PM
    PM: Remove sysdev suspend, resume and shutdown operations
    PM / PowerPC: Use struct syscore_ops instead of sysdevs for PM
    PM / UNICORE32: Use struct syscore_ops instead of sysdevs for PM
    PM / AVR32: Use struct syscore_ops instead of sysdevs for PM
    ...

    Linus Torvalds
     
  • …stable/mmu.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/irq' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: do not clear and mask evtchns in __xen_evtchn_do_upcall

    * 'stable/p2m.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/p2m: Create entries in the P2M_MFN trees's to track 1-1 mappings

    * 'stable/e820.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/setup: Fix for incorrect xen_extra_mem_start initialization under 32-bit
    xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings.

    * 'stable/mmu.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen mmu: fix a race window causing leave_mm BUG()

    Linus Torvalds
     
  • …t.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/balloon.cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/balloon: Move dec_totalhigh_pages() from __balloon_append() to balloon_append()
    xen/balloon: Clarify credit calculation
    xen/balloon: Simplify HVM integration
    xen/balloon: Use PageHighMem() for high memory page detection

    * 'stable/general.cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    drivers/xen/sys-hypervisor: Cleanup code/data sections definitions
    arch/x86/xen/smp: Cleanup code/data sections definitions
    arch/x86/xen/time: Cleanup code/data sections definitions
    arch/x86/xen/xen-ops: Cleanup code/data sections definitions
    arch/x86/xen/mmu: Cleanup code/data sections definitions
    arch/x86/xen/setup: Cleanup code/data sections definitions
    arch/x86/xen/enlighten: Cleanup code/data sections definitions
    arch/x86/xen/irq: Cleanup code/data sections definitions
    xen: tidy up whitespace in drivers/xen/Makefile

    Linus Torvalds
     
  • …rnel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/backend.base.v3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pci: Fix compiler error when CONFIG_XEN_PRIVILEGED_GUEST is not set.
    xen/p2m: Add EXPORT_SYMBOL_GPL to the M2P override functions.
    xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override.
    xen/irq: The Xen hypervisor cleans up the PIRQs if the other domain forgot.
    xen/irq: Export 'xen_pirq_from_irq' function.
    xen/irq: Add support to check if IRQ line is shared with other domains.
    xen/irq: Check if the PCI device is owned by a domain different than DOMID_SELF.
    xen/pci: Add xen_[find|register|unregister]_device_domain_owner functions.

    * 'stable/gntalloc.v7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/gntdev,gntalloc: Remove unneeded VM flags

    Linus Torvalds
     

19 May, 2011

1 commit


13 May, 2011

1 commit


12 May, 2011

1 commit

  • Since suspend, resume and shutdown operations in struct sysdev_class
    and struct sysdev_driver are not used any more, remove them. Also
    drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used
    for executing those operations and modify all of their users
    accordingly. This reduces kernel code size quite a bit and reduces
    its complexity.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

11 May, 2011

1 commit

  • Change the irq handler of evtchns and pirqs that don't need EOI (pirqs
    that correspond to physical edge interrupts) to handle_edge_irq.

    Use handle_fasteoi_irq for pirqs that need eoi (they generally
    correspond to level triggered irqs), no risk in loosing interrupts
    because we have to EOI the irq anyway.

    This change has the following benefits:

    - it uses the very same handlers that Linux would use on native for the
    same irqs (handle_edge_irq for edge irqs and msis, and
    handle_fasteoi_irq for everything else);

    - it uses these handlers in the same way native code would use them: it
    let Linux mask\unmask and ack the irq when Linux want to mask\unmask
    and ack the irq;

    - it fixes a problem occurring when a driver calls disable_irq() in its
    handler: the old code was unconditionally unmasking the evtchn even if
    the irq is disabled when irq_eoi was called.

    See Documentation/DocBook/genericirq.tmpl for more informations.

    Signed-off-by: Stefano Stabellini
    [v1: Fixed space/tab issues]
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

26 Apr, 2011

1 commit


20 Apr, 2011

1 commit

  • Device suspend/resume infrastructure is used not only by the suspend
    and hibernate code in kernel/power, but also by APM, Xen and the
    kexec jump feature. However, commit 40dc166cb5dddbd36aa4ad11c03915ea
    (PM / Core: Introduce struct syscore_ops for core subsystems PM)
    failed to add syscore_suspend() and syscore_resume() calls to that
    code, which generally leads to breakage when the features in question
    are used.

    To fix this problem, add the missing syscore_suspend() and
    syscore_resume() calls to arch/x86/kernel/apm_32.c, kernel/kexec.c
    and drivers/xen/manage.c.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Ian Campbell

    Rafael J. Wysocki
     

18 Apr, 2011

1 commit

  • We only supported the M2P (and P2M) override only for the
    GNTMAP_contains_pte type mappings. Meaning that we grants
    operations would "contain the machine address of the PTE to update"
    If the flag is unset, then the grant operation is
    "contains a host virtual address". The latter case means that
    the Hypervisor takes care of updating our page table
    (specifically the PTE entry) with the guest's MFN. As such we should
    not try to do anything with the PTE. Previous to this patch
    we would try to clear the PTE which resulted in Xen hypervisor
    being upset with us:

    (XEN) mm.c:1066:d0 Attempt to implicitly unmap a granted PTE c0100000ccc59067
    (XEN) domain_crash called from mm.c:1067
    (XEN) Domain 0 (vcpu#0) crashed on cpu#3:
    (XEN) ----[ Xen-4.0-110228 x86_64 debug=y Not tainted ]----

    and crashing us.

    This patch allows us to inhibit the PTE clearing in the PV guest
    if the GNTMAP_contains_pte is not set.

    On the m2p_remove_override path we provide the same parameter.

    Sadly in the grant-table driver we do not have a mechanism to
    tell m2p_remove_override whether to clear the PTE or not. Since
    the grant-table driver is used by user-space, we can safely assume
    that it operates only on PTE's. Hence the implementation for
    it to work on !GNTMAP_contains_pte returns -EOPNOTSUPP. In the future
    we can implement the support for this. It will require some extra
    accounting structure to keep track of the page[i], and the flag.

    [v1: Added documentation details, made it return -EOPNOTSUPP instead
    of trying to do a half-way implementation]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

14 Apr, 2011

4 commits


13 Apr, 2011

1 commit


12 Apr, 2011

2 commits

  • * 'stable/bug-fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: Allow PV-OPS kernel to detect whether XSAVE is supported
    xen: just completely disable XSAVE
    xen/debug: Don't be so verbose with WARN on 1-1 mapping errors.
    xen: events: fix error checks in bind_*_to_irqhandler()

    Linus Torvalds
     
  • Xen save/restore is going to use hibernate device callbacks for
    quiescing devices and putting them back to normal operations and it
    would need to select CONFIG_HIBERNATION for this purpose. However,
    that also would cause the hibernate interfaces for user space to be
    enabled, which might confuse user space, because the Xen kernels
    don't support hibernation. Moreover, it would be wasteful, as it
    would make the Xen kernels include a substantial amount of code that
    they would never use.

    To address this issue introduce new power management Kconfig option
    CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
    that is necessary for the hibernate device callbacks to work and make
    CONFIG_HIBERNATION select it. Then, Xen save/restore will be able to
    select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
    hibernate code along with it.

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Shriram Rajagopalan

    Rafael J. Wysocki
     

10 Apr, 2011

1 commit


31 Mar, 2011

2 commits


30 Mar, 2011

4 commits

  • git commit 9be4d4575906af9698de660e477f949a076c87e1 (xen: add
    extra pages to balloon) splited balloon_append() into two functions
    (balloon_append() and __balloon_append()) and left decrementation
    of totalram_pages counter in __balloon_append(). In this situation
    if __balloon_append() is called on i386 with highmem page referenced
    then totalhigh_pages is decremented, however, it should not. This
    patch corrects that issue and moves dec_totalhigh_pages() from
    __balloon_append() to balloon_append(). Now totalram_pages and
    totalhigh_pages are decremented simultaneously only when
    balloon_append() is called.

    Acked-by: Ian Campbell
    Acked-by: Daniel De Graaf
    Signed-off-by: Daniel Kiper
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel Kiper
     
  • Move credit calculation to current_target()
    and rename it to current_credit().

    Acked-by: Ian Campbell
    Acked-by: Daniel De Graaf
    Signed-off-by: Daniel Kiper
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel Kiper
     
  • Simplify HVM integration proposed by Stefano Stabellini
    in 53d5522cad291a0e93a385e0594b6aea6b54a071.

    Acked-by: Ian Campbell
    Acked-by: Daniel De Graaf
    Signed-off-by: Daniel Kiper
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel Kiper
     
  • Replace pfn < max_low_pfn by !PageHighMem() in increase_reservation().
    It makes more clearer what is going on.

    Acked-by: Ian Campbell
    Acked-by: Daniel De Graaf
    Signed-off-by: Daniel Kiper
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel Kiper
     

29 Mar, 2011

2 commits


24 Mar, 2011

2 commits


18 Mar, 2011

3 commits

  • * 'stable/xen.pm.bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: use freeze/restore/thaw PM events for suspend/resume/chkpt
    xen: xenbus PM events support

    Linus Torvalds
     
  • …it.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/irq.fairness' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: events: Remove redundant clear of l2i at end of round-robin loop
    xen: events: Make round-robin scan fairer by snapshotting each l2 word once only
    xen: events: Clean up round-robin evtchn scan.
    xen: events: Make last processed event channel a per-cpu variable.
    xen: events: Process event channels notifications in round-robin order.

    * 'stable/irq.ween_of_nr_irqs' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: events: Fix compile error if CONFIG_SMP is not defined.
    xen: events: correct locking in xen_irq_from_pirq
    xen: events: propagate irq allocation failure instead of panicking
    xen: events: do not workaround too-small nr_irqs
    xen: events: remove use of nr_irqs as upper bound on number of pirqs
    xen: events: dynamically allocate irq info structures
    xen: events: maintain a list of Xen interrupts
    xen: events: push setup of irq<->{evtchn,ipi,virq,pirq} maps into irq_info init functions
    xen: events: turn irq_info constructors into initialiser functions
    xen: events: use per-cpu variable for cpu_evtchn_mask
    xen: events: refactor GSI pirq bindings functions
    xen: events: rename restore_cpu_pirqs -> restore_pirqs
    xen: events: remove unused public functions
    xen: events: fix xen_map_pirq_gsi error return
    xen: events: simplify comment
    xen: events: separate two unrelated halves of if condition

    Fix up trivial conflicts in drivers/xen/events.c

    Linus Torvalds
     
  • …f git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/hvc-console' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/hvc: Disable probe_irq_on/off from poking the hvc-console IRQ line.

    * 'stable/gntalloc.v6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: gntdev: fix build warning
    xen/p2m/m2p/gnttab: do not add failed grant maps to m2p override
    xen-gntdev: Add cast to pointer
    xen-gntdev: Fix incorrect use of zero handle
    xen: change xen/[gntdev/gntalloc] to default m
    xen-gntdev: prevent using UNMAP_NOTIFY_CLEAR_BYTE on read-only mappings
    xen-gntdev: Avoid double-mapping memory
    xen-gntdev: Avoid unmapping ranges twice
    xen-gntdev: Use map->vma for checking map validity
    xen-gntdev: Fix unmap notify on PV domains
    xen-gntdev: Fix memory leak when mmap fails
    xen/gntalloc,gntdev: Add unmap notify ioctl
    xen-gntalloc: Userspace grant allocation driver
    xen-gntdev: Support mapping in HVM domains
    xen-gntdev: Add reference counting to maps
    xen-gntdev: Use find_vma rather than iterating our vma list manually
    xen-gntdev: Change page limit to be global instead of per-open

    * 'stable/balloon' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (24 commits)
    xen-gntdev: Use ballooned pages for grant mappings
    xen-balloon: Add interface to retrieve ballooned pages
    xen-balloon: Move core balloon functionality out of module
    xen/balloon: Remove pr_info's and don't alter retry_count
    xen/balloon: Protect against CPU exhaust by event/x process
    xen/balloon: Migration from mod_timer() to schedule_delayed_work()
    xen/balloon: Removal of driver_pages

    Linus Torvalds
     

17 Mar, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
    bonding: enable netpoll without checking link status
    xfrm: Refcount destination entry on xfrm_lookup
    net: introduce rx_handler results and logic around that
    bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
    bonding: wrap slave state work
    net: get rid of multiple bond-related netdevice->priv_flags
    bonding: register slave pointer for rx_handler
    be2net: Bump up the version number
    be2net: Copyright notice change. Update to Emulex instead of ServerEngines
    e1000e: fix kconfig for crc32 dependency
    netfilter ebtables: fix xt_AUDIT to work with ebtables
    xen network backend driver
    bonding: Improve syslog message at device creation time
    bonding: Call netif_carrier_off after register_netdevice
    bonding: Incorrect TX queue offset
    net_sched: fix ip_tos2prio
    xfrm: fix __xfrm_route_forward()
    be2net: Fix UDP packet detected status in RX compl
    Phonet: fix aligned-mode pipe socket buffer header reserve
    netxen: support for GbE port settings
    ...

    Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
    with the staging updates.

    Linus Torvalds
     
  • Use PM_FREEZE, PM_THAW and PM_RESTORE power events for
    suspend/resume/checkpoint functionality, instead of PM_SUSPEND
    and PM_RESUME. Use of these pm events fixes the Xen Guest hangup
    when taking checkpoints. When a suspend event is cancelled
    (while taking checkpoints once/continuously), we use PM_THAW
    instead of PM_RESUME. PM_RESTORE is used when suspend is not
    cancelled. See Documentation/power/devices.txt and linux/pm.h
    for more info about freeze, thaw and restore. The sequence of
    pm events in a suspend-resume scenario is shown below.

    dpm_suspend_start(PMSG_FREEZE);

    dpm_suspend_noirq(PMSG_FREEZE);

    sysdev_suspend(PMSG_FREEZE);
    cancelled = suspend_hypercall()
    sysdev_resume();

    dpm_resume_noirq(cancelled ? PMSG_THAW : PMSG_RESTORE);

    dpm_resume_end(cancelled ? PMSG_THAW : PMSG_RESTORE);

    Acked-by: Ian Campbell
    Signed-off-by: Shriram Rajagopalan
    Signed-off-by: Konrad Rzeszutek Wilk

    Shriram Rajagopalan
     
  • Make xenbus frontend device subscribe to PM events
    to receive suspend/resume/freeze/thaw/restore
    notifications.

    Signed-off-by: Kenji Wakamiya
    Signed-off-by: Kazuhiro Suzuki
    Signed-off-by: Shriram Rajagopalan
    Acked-by: Ian Campbell
    [shriram--minor mods and improved commit message]
    Signed-off-by: Konrad Rzeszutek Wilk

    Kazuhiro SUZUKI
     

16 Mar, 2011

2 commits

  • Grant mappings cause the PFNMFN mapping to be lost on the pages used
    for the mapping. Instead of leaking memory, use pages that have already
    been ballooned out and so have no valid mapping. This removes the need
    for the bad-page leak workaround as pages are repopulated by the balloon
    driver.

    Acked-by: Ian Campbell
    Signed-off-by: Daniel De Graaf
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     
  • Pages that have been ballooned are useful for other Xen drivers doing
    grant table actions, because these pages have valid struct page/PFNs but
    have no valid MFN so are available for remapping.

    Acked-by: Ian Campbell
    Signed-off-by: Daniel De Graaf
    [v2: Deal with rebasing on top of modified balloon code]
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk