1. 18 Jul, 2008 2 commits
    • Lai Jiangshan's avatar
      rcu classic: new algorithm for callbacks-processing(v2) · 5127bed5
      Lai Jiangshan authored
      This is v2, it's a little deference from v1 that I
      had send to lkml.
      use ACCESS_ONCE
      use rcu_batch_after/rcu_batch_before for batch # comparison.
      
      rcutorture test result:
      (hotplugs: do cpu-online/offline once per second)
      
      No CONFIG_NO_HZ:           OK, 12hours
      No CONFIG_NO_HZ, hotplugs: OK, 12hours
      CONFIG_NO_HZ=y:            OK, 24hours
      CONFIG_NO_HZ=y, hotplugs:  Failed.
      (Failed also without my patch applied, exactly the same bug occurred,
      http://lkml.org/lkml/2008/7/3/24)
      
      v1's email thread:
      http://lkml.org/lkml/2008/6/2/539
      
      v1's description:
      
      The code/algorithm of the implement of current callbacks-processing
      is very efficient and technical. But when I studied it and I found
      a disadvantage:
      
      In multi-CPU systems, when a new RCU callback is being
      queued(call_rcu[_bh]), this callback will be invoked after the grace
      period for the batch with batch number = rcp->cur+2 has completed
      very very likely in current implement. Actually, this callback can be
      invoked after the grace period for the batch with
      batch number = rcp->cur+1 has completed. The delay of invocation means
      that latency of synchronize_rcu() is extended. But more important thing
      is that the callbacks usually free memory, and these works are delayed
      too! it's necessary for reclaimer to free memory as soon as
      possible when left memory is few.
      
      A very simple way can solve this problem:
      a field(struct rcu_head::batch) is added to record the batch number for
      the RCU callback. And when a new RCU callback is being queued, we
      determine the batch number for this callback(head->batch = rcp->cur+1)
      and we move this callback to rdp->donelist if we find
      that head->batch <= rcp->completed when we process callbacks.
      This simple way reduces the wait time for invocation a lot. (about
      2.5Grace Period -> 1.5Grace Period in average in multi-CPU systems)
      
      This is my algorithm. But I do not add any field for struct rcu_head
      in my implement. We just need to memorize the last 2 batches and
      their batch number, because these 2 batches include all entries that
      for whom the grace period hasn't completed. So we use a special
      linked-list rather than add a field.
      Please see the comment of struct rcu_data.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: Gautham Shenoy <ego@in.ibm.com>
      Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5127bed5
    • Lai Jiangshan's avatar
      rcu classic: simplify the next pending batch · 3cac97cb
      Lai Jiangshan authored
      use a batch number(rcp->pending) instead of a flag(rcp->next_pending)
      
      rcu_start_batch() need to change this flag, so mb()s is needed
      for memory-access safe.
      
      but(after this patch applied) rcu_start_batch() do not change
      this batch number(rcp->pending), rcp->pending is managed by
      __rcu_process_callbacks only, and troublesome mb()s are eliminated.
      
      And codes look simpler and clearer.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: Gautham Shenoy <ego@in.ibm.com>
      Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3cac97cb
  2. 17 Jul, 2008 32 commits
  3. 16 Jul, 2008 6 commits
    • Jesse Barnes's avatar
      Revert "x86/PCI: ACPI based PCI gap calculation" · 58b6e553
      Jesse Barnes authored
      This reverts commit 809d9a8f.
      
      This one isn't quite ready for prime time.  It needs more testing and
      additional feedback from the ACPI guys.
      58b6e553
    • Coly Li's avatar
      [PATCH] ocfs2: fix oops in mmap_truncate testing · c0420ad2
      Coly Li authored
      This patch fixes a mmap_truncate bug which was found by ocfs2 test suite.
      
      In an ocfs2 cluster more than 1 node, run program mmap_truncate, which races
      mmap writes and truncates from multiple processes. While the test is
      running, a stat from another node forces writeout, causing an oops in
      ocfs2_get_block() because it sees a buffer to write which isn't allocated.
      
      This patch fixed the bug by clear dirty and uptodate bits in buffer, leave
      the buffer unmapped and return.
      
      Fix is suggested by Mark Fasheh, and I code up the patch.
      Signed-off-by: default avatarColy Li <coyli@suse.de>
      Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
      c0420ad2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc · 8a0ca91e
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (68 commits)
        sdio_uart: Fix SDIO break control to now return success or an error
        mmc: host driver for Ricoh Bay1Controllers
        sdio: sdio_io.c Fix sparse warnings
        sdio: fix the use of hard coded timeout value.
        mmc: OLPC: update vdd/powerup quirk comment
        mmc: fix spares errors of sdhci.c
        mmc: remove multiwrite capability
        wbsd: fix bad dma_addr_t conversion
        atmel-mci: Driver for Atmel on-chip MMC controllers
        mmc: fix sdio_io sparse errors
        mmc: wbsd.c fix shadowing of 'dma' variable
        MMC: S3C24XX: Refuse incorrectly aligned transfers
        MMC: S3C24XX: Add maintainer entry
        MMC: S3C24XX: Update error debugging.
        MMC: S3C24XX: Add media presence test to request handling.
        MMC: S3C24XX: Fix use of msecs where jiffies are needed
        MMC: S3C24XX: Add MODULE_ALIAS() entries for the platform devices
        MMC: S3C24XX: Fix s3c2410_dma_request() return code check.
        MMC: S3C24XX: Allow card-detect on non-IRQ capable pin
        MMC: S3C24XX: Ensure host->mrq->data is valid
        ...
      
      Manually fixed up bogus executable bits on drivers/mmc/core/sdio_io.c
      and include/linux/mmc/sdio_func.h when merging.
      8a0ca91e
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.infradead.org/~dedekind/ubifs-2.6 · 9c1be0c4
      Linus Torvalds authored
      * 'for_linus' of git://git.infradead.org/~dedekind/ubifs-2.6:
        UBIFS: include to compilation
        UBIFS: add new flash file system
        UBIFS: add brief documentation
        MAINTAINERS: add UBIFS section
        do_mounts: allow UBI root device name
        VFS: export sync_sb_inodes
        VFS: move inode_lock into sync_sb_inodes
      9c1be0c4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · 42fdd144
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits)
        IDE: Report errors during drive reset back to user space
        Update documentation of HDIO_DRIVE_RESET ioctl
        IDE: Remove unused code
        IDE: Fix HDIO_DRIVE_RESET handling
        hd.c: remove the #include <linux/mc146818rtc.h>
        update the BLK_DEV_HD help text
        move ide/legacy/hd.c to drivers/block/
        ide/legacy/hd.c: use late_initcall()
        remove BLK_DEV_HD_ONLY
        ide: endian annotations in ide-floppy.c
        ide-floppy: zero out the whole struct ide_atapi_pc on init
        ide-floppy: fold idefloppy_create_test_unit_ready_cmd into idefloppy_open
        ide-cd: move request prep chunk from cdrom_do_newpc_cont to rq issue path
        ide-cd: move request prep from cdrom_start_rw_cont to rq issue path
        ide-cd: move request prep from cdrom_start_seek_continuation to rq issue path
        ide-cd: fold cdrom_start_seek into ide_cd_do_request
        ide-cd: simplify request issuing path
        ide-cd: mv ide_do_rw_cdrom ide_cd_do_request
        ide-cd: cdrom_start_seek: remove unused argument block
        ide-cd: ide_do_rw_cdrom: add the catch-all bad request case to the if-else block
        ...
      42fdd144
    • Linus Torvalds's avatar
      Merge branch 'release-2.6.27' of... · 4314652b
      Linus Torvalds authored
      Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-merge-2.6
      
      * 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-merge-2.6: (87 commits)
        Fix FADT parsing
        Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.
        ACPI: use dev_printk when possible
        PNPACPI: add support for HP vendor-specific CCSR descriptors
        PNP: avoid legacy IDE IRQs
        PNP: convert resource options to single linked list
        ISAPNP: handle independent options following dependent ones
        PNP: remove extra 0x100 bit from option priority
        PNP: support optional IRQ resources
        PNP: rename pnp_register_*_resource() local variables
        PNPACPI: ignore _PRS interrupt numbers larger than PNP_IRQ_NR
        PNP: centralize resource option allocations
        PNP: remove redundant pnp_can_configure() check
        PNP: make resource assignment functions return 0 (success) or -EBUSY (failure)
        PNP: in debug resource dump, make empty list obvious
        PNP: improve resource assignment debug
        PNP: increase I/O port & memory option address sizes
        PNP: introduce pnp_irq_mask_t typedef
        PNP: make resource option structures private to PNP subsystem
        PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM
        ...
      4314652b