1. 19 Oct, 2010 1 commit
    • Yasuaki Ishimatsu's avatar
      block: fix accounting bug on cross partition merges · 7681bfee
      Yasuaki Ishimatsu authored
      /proc/diskstats would display a strange output as follows.
      
      $ cat /proc/diskstats |grep sda
         8       0 sda 90524 7579 102154 20464 0 0 0 0 0 14096 20089
         8       1 sda1 19085 1352 21841 4209 0 0 0 0 4294967064 15689 4293424691
                                                      ~~~~~~~~~~
         8       2 sda2 71252 3624 74891 15950 0 0 0 0 232 23995 1562390
         8       3 sda3 54 487 2188 92 0 0 0 0 0 88 92
         8       4 sda4 4 0 8 0 0 0 0 0 0 0 0
         8       5 sda5 81 2027 2130 138 0 0 0 0 0 87 137
      
      Its reason is the wrong way of accounting hd_struct->in_flight. When a bio is
      merged into a request belongs to different partition by ELEVATOR_FRONT_MERGE.
      
      The detailed root cause is as follows.
      
      Assuming that there are two partition, sda1 and sda2.
      
      1. A request for sda2 is in request_queue. Hence sda1's hd_struct->in_flight
         is 0 and sda2's one is 1.
      
              | hd_struct->in_flight
         ---------------------------
         sda1 |          0
         sda2 |          1
         ---------------------------
      
      2. A bio belongs to sda1 is issued and is merged into the request mentioned on
         step1 by ELEVATOR_BACK_MERGE. The first sector of the request is changed
         from sda2 region to sda1 region. However the two partition's
         hd_struct->in_flight are not changed.
      
              | hd_struct->in_flight
         ---------------------------
         sda1 |          0
         sda2 |          1
         ---------------------------
      
      3. The request is finished and blk_account_io_done() is called. In this case,
         sda2's hd_struct->in_flight, not a sda1's one, is decremented.
      
              | hd_struct->in_flight
         ---------------------------
         sda1 |         -1
         sda2 |          1
         ---------------------------
      
      The patch fixes the problem by caching the partition lookup
      inside the request structure, hence making sure that the increment
      and decrement will always happen on the same partition struct. This
      also speeds up IO with accounting enabled, since it cuts down on
      the number of lookups we have to do.
      
      When reloading partition tables, quiesce IO to ensure that no
      request references to the partition struct exists. When it is safe
      to free the partition table, the IO for that device is restarted
      again.
      Signed-off-by: default avatarYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      7681bfee
  2. 15 Oct, 2010 2 commits
  3. 13 Oct, 2010 1 commit
  4. 01 Oct, 2010 10 commits
  5. 25 Sep, 2010 1 commit
  6. 24 Sep, 2010 2 commits
  7. 20 Sep, 2010 1 commit
    • Corrado Zoccolo's avatar
      cfq: improve fsync performance for small files · 749ef9f8
      Corrado Zoccolo authored
      Fsync performance for small files achieved by cfq on high-end disks is
      lower than what deadline can achieve, due to idling introduced between
      the sync write happening in process context and the journal commit.
      
      Moreover, when competing with a sequential reader, a process writing
      small files and fsync-ing them is starved.
      
      This patch fixes the two problems by:
      - marking journal commits as WRITE_SYNC, so that they get the REQ_NOIDLE
        flag set,
      - force all queues that have REQ_NOIDLE requests to be put in the noidle
        tree.
      
      Having the queue associated to the fsync-ing process and the one associated
       to journal commits in the noidle tree allows:
      - switching between them without idling,
      - fairness vs. competing idling queues, since they will be serviced only
        after the noidle tree expires its slice.
      Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Tested-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarCorrado Zoccolo <czoccolo@gmail.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      749ef9f8
  8. 17 Sep, 2010 1 commit
    • Jens Axboe's avatar
      do_mounts: only enable PARTUUID for CONFIG_BLOCK · 6d0aed7a
      Jens Axboe authored
      When CONFIG_BLOCK is not enabled:
      
      init/do_mounts.c:71: error: implicit declaration of function 'dev_to_part'
      init/do_mounts.c:71: warning: initialization makes pointer from integer without a cast
      init/do_mounts.c:73: error: dereferencing pointer to incomplete type
      init/do_mounts.c:76: error: dereferencing pointer to incomplete type
      init/do_mounts.c:76: error: dereferencing pointer to incomplete type
      init/do_mounts.c:102: error: implicit declaration of function 'part_pack_uuid'
      init/do_mounts.c:104: error: 'block_class' undeclared (first use in this function)
      Reported-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      6d0aed7a
  9. 16 Sep, 2010 10 commits
  10. 15 Sep, 2010 4 commits
    • Will Drewry's avatar
      init: add support for root devices specified by partition UUID · b5af921e
      Will Drewry authored
      This is the third patch in a series which adds support for
      storing partition metadata, optionally, off of the hd_struct.
      
      One major use for that data is being able to resolve partition
      by other identities than just the index on a block device.  Device
      enumeration varies by platform and there's a benefit to being able
      to use something like EFI GPT's GUIDs to determine the correct
      block device and partition to mount as the root.
      
      This change adds that support to root= by adding support for
      the following syntax:
      
        root=PARTUUID=hex-uuid
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      b5af921e
    • Will Drewry's avatar
      genhd, efi: add efi partition metadata to hd_structs · eec7ecfe
      Will Drewry authored
      This change extends the partition_meta_info structure to
      support EFI GPT-specific metadata and ensures that data
      is copied in on partition scanning.
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      eec7ecfe
    • Will Drewry's avatar
      block, partition: add partition_meta_info to hd_struct · 6d1d8050
      Will Drewry authored
      I'm reposting this patch series as v4 since there have been no additional
      comments, and I cleaned up one extra bit of unneeded code (in 3/3). The patches
      are against Linus's tree: 2bfc96a1
      (2.6.36-rc3).
      
      Would this patchset be suitable for inclusion in an mm branch?
      
      This changes adds a partition_meta_info struct which itself contains a
      union of structures that provide partition table specific metadata.
      
      This change leaves the union empty. The subsequent patch includes an
      implementation for CONFIG_EFI_PARTITION-based metadata.
      Signed-off-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      6d1d8050
    • Namhyung Kim's avatar
      block: fix an address space warning in blk-map.c · 14417799
      Namhyung Kim authored
      Change type of 2nd parameter of blk_rq_aligned() into unsigned long
      and remove unnecessary casting. Now we can call it with 'uaddr'
      instead of 'ubuf' in __blk_rq_map_user() so that it can remove
      following warnings from sparse:
      
       block/blk-map.c:57:31: warning: incorrect type in argument 2 (different address spaces)
       block/blk-map.c:57:31:    expected void *addr
       block/blk-map.c:57:31:    got void [noderef] <asn:1>*ubuf
      
      However blk_rq_map_kern() needs one more local variable to handle it.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
      14417799
  11. 14 Sep, 2010 1 commit
  12. 10 Sep, 2010 3 commits
  13. 23 Aug, 2010 1 commit
  14. 22 Aug, 2010 2 commits
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3dc8d7f0
      Linus Torvalds authored
      * 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: PIT: free irq source id in handling error path
        KVM: destroy workqueue on kvm_create_pit() failures
        KVM: fix poison overwritten caused by using wrong xstate size
      3dc8d7f0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel · 4238a417
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (58 commits)
        drm/i915,intel_agp: Add support for Sandybridge D0
        drm/i915: fix render pipe control notify on sandybridge
        agp/intel: set 40-bit dma mask on Sandybridge
        drm/i915: Remove the conflicting BUG_ON()
        drm/i915/suspend: s/IS_IRONLAKE/HAS_PCH_SPLIT/
        drm/i915/suspend: Flush register writes before busy-waiting.
        i915: disable DAC on Ironlake also when doing CRT load detection.
        drm/i915: wait for actual vblank, not just 20ms
        drm/i915: make sure eDP PLL is enabled at the right time
        drm/i915: fix VGA plane disable for Ironlake+
        drm/i915: eDP mode set sequence corrections
        drm/i915: add panel reset workaround
        drm/i915: Enable RC6 on Ironlake.
        drm/i915/sdvo: Only set is_lvds if we have a valid fixed mode.
        drm/i915: Set up a render context on Ironlake
        drm/i915 invalidate indirect state pointers at end of ring exec
        drm/i915: Wake-up wait_request() from elapsed hang-check (v2)
        drm/i915: Apply i830 errata for cursor alignment
        drm/i915: Only update i845/i865 CURBASE when disabled (v2)
        drm/i915: FBC is updated within set_base() so remove second call in mode_set()
        ...
      4238a417