1. 21 9月, 2016 7 次提交
    • A
      lightnvm: propagate device_add() error code · 1e3aeae4
      Arnd Bergmann 提交于
      device_add() may fail, and all callers are supposed to check the
      return value, but one new user in lightnvm doesn't:
      
      drivers/lightnvm/sysfs.c: In function 'nvm_sysfs_register_dev':
      drivers/lightnvm/sysfs.c:184:2: error: ignoring return value of 'device_add',
        declared with attribute warn_unused_result [-Werror=unused-result]
      
      This changes the caller to propagate any error codes, which avoids
      the warning.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 38c9e260b9f9 ("lightnvm: expose device geometry through sysfs")
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      1e3aeae4
    • S
      lightnvm: expose device geometry through sysfs · 40267efd
      Simon A. F. Lund 提交于
      For a host to access an Open-Channel SSD, it has to know its geometry,
      so that it writes and reads at the appropriate device bounds.
      
      Currently, the geometry information is kept within the kernel, and not
      exported to user-space for consumption. This patch exposes the
      configuration through sysfs and enables user-space libraries, such as
      liblightnvm, to use the sysfs implementation to get the geometry of an
      Open-Channel SSD.
      
      The sysfs entries are stored within the device hierarchy, and can be
      found using the "lightnvm" device type.
      
      An example configuration looks like this:
      
      /sys/class/nvme/
      └── nvme0n1
         ├── capabilities: 3
         ├── device_mode: 1
         ├── erase_max: 1000000
         ├── erase_typ: 1000000
         ├── flash_media_type: 0
         ├── media_capabilities: 0x00000001
         ├── media_type: 0
         ├── multiplane: 0x00010101
         ├── num_blocks: 1022
         ├── num_channels: 1
         ├── num_luns: 4
         ├── num_pages: 64
         ├── num_planes: 1
         ├── page_size: 4096
         ├── prog_max: 100000
         ├── prog_typ: 100000
         ├── read_max: 10000
         ├── read_typ: 10000
         ├── sector_oob_size: 0
         ├── sector_size: 4096
         ├── media_manager: gennvm
         ├── ppa_format: 0x380830082808001010102008
         ├── vendor_opcode: 0
         ├── max_phys_secs: 64
         └── version: 1
      Signed-off-by: NSimon A. F. Lund <slund@cnexlabs.com>
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      40267efd
    • M
      lightnvm: control life of nvm_dev in driver · b0b4e09c
      Matias Bjørling 提交于
      LightNVM compatible device drivers does not have a method to expose
      LightNVM specific sysfs entries.
      
      To enable LightNVM sysfs entries to be exposed, lightnvm device
      drivers require a struct device to attach it to. To allow both the
      actual device driver and lightnvm sysfs entries to coexist, the device
      driver tracks the lifetime of the nvm_dev structure.
      
      This patch refactors NVMe and null_blk to handle the lifetime of struct
      nvm_dev, which eliminates the need for struct gendisk when a lightnvm
      compatible device is provided.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b0b4e09c
    • M
      blk-mq: register device instead of disk · b21d5b30
      Matias Bjørling 提交于
      Enable devices without a gendisk instance to register itself with blk-mq
      and expose the associated multi-queue sysfs entries.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b21d5b30
    • M
      null_blk: refactor to support non-gendisk devices · 9ae2d0aa
      Matias Bjørling 提交于
      With LightNVM enabled devices, the gendisk structure is not exposed
      to the user. This hides the device driver specific sysfs entries, and
      prevents binding of LightNVM geometry information to the device.
      
      Refactor the device registration process, so that gendisk and
      non-gendisk devices are easily managed.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      9ae2d0aa
    • M
      nvme: refactor namespaces to support non-gendisk devices · ac81bfa9
      Matias Bjørling 提交于
      With LightNVM enabled namespaces, the gendisk structure is not exposed
      to the user. This prevents LightNVM users from accessing the NVMe device
      driver specific sysfs entries, and LightNVM namespace geometry.
      
      Refactor the revalidation process, so that a namespace, instead of a
      gendisk, is revalidated. This later allows patches to wire up the
      sysfs entries up to a non-gendisk namespace.
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ac81bfa9
    • G
      lightnvm: NVM should depend on HAS_DMA · e105ddb4
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
          drivers/built-in.o: In function `nvme_nvm_dev_dma_free':
          lightnvm.c:(.text+0x23df1a): undefined reference to `dma_pool_free'
          drivers/built-in.o: In function `nvme_nvm_dev_dma_alloc':
          lightnvm.c:(.text+0x23df38): undefined reference to `dma_pool_alloc'
          drivers/built-in.o: In function `nvme_nvm_destroy_dma_pool':
          lightnvm.c:(.text+0x23df4c): undefined reference to `dma_pool_destroy'
          drivers/built-in.o: In function `nvme_nvm_create_dma_pool':
          lightnvm.c:(.text+0x23df7e): undefined reference to `dma_pool_create'
      
      and
      
          ERROR: "dma_pool_destroy" [drivers/nvme/host/nvme-core.ko] undefined!
          ERROR: "dma_pool_free" [drivers/nvme/host/nvme-core.ko] undefined!
          ERROR: "dma_pool_alloc" [drivers/nvme/host/nvme-core.ko] undefined!
          ERROR: "dma_pool_create" [drivers/nvme/host/nvme-core.ko] undefined!
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NMatias Bjørling <m@bjorling.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e105ddb4
  2. 19 9月, 2016 1 次提交
  3. 18 9月, 2016 1 次提交
  4. 17 9月, 2016 7 次提交
  5. 15 9月, 2016 1 次提交
    • M
      blk-mq: introduce blk_mq_delay_kick_requeue_list() · 2849450a
      Mike Snitzer 提交于
      blk_mq_delay_kick_requeue_list() provides the ability to kick the
      q->requeue_list after a specified time.  To do this the request_queue's
      'requeue_work' member was changed to a delayed_work.
      
      blk_mq_delay_kick_requeue_list() allows DM to defer processing requeued
      requests while it doesn't make sense to immediately requeue them
      (e.g. when all paths in a DM multipath have failed).
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      2849450a
  6. 14 9月, 2016 11 次提交
  7. 09 9月, 2016 4 次提交
  8. 29 8月, 2016 8 次提交
    • B
      mtip32xx: mark symbols static where possible · 99e6b87e
      Baoyou Xie 提交于
      We get 1 warning when biuld kernel with W=1:
      drivers/block/mtip32xx/mtip32xx.c:3689:6: warning: no previous prototype for
       'mtip_block_release' [-Wmissing-prototypes]
      
      In fact, this function is only used in the file in which it is declared
      and don't need a declaration, but can be made static.
      so this patch marks it 'static'.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      99e6b87e
    • J
      blk-mq: prefetch request in blk_mq_tag_to_rq() · 88c7b2b7
      Jens Axboe 提交于
      When drivers or the core calls this function, they usually
      dereference the request shortly there after. Prefetch the first
      cache line.
      
      Profiling IO workloads shows that this is the most common cache
      miss on the block side of things.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      88c7b2b7
    • J
      blk-mq: improve layout of blk_mq_hw_ctx · 8d354f13
      Jens Axboe 提交于
      Various cache line optimizations:
      
      - Move delay_work towards the end. It's huge, and we don't use it
        a lot (only SCSI).
      
      - Move the atomic state into the same cacheline as the the dispatch
        list and lock.
      
      - Rearrange a few members to pack it better.
      
      - Shrink the max-order for dispatch accounting from 10 to 7. This
        means that ->dispatched[] and ->run now take up their own
        cacheline.
      
      This shrinks struct blk_mq_hw_ctx down to 8 cachelines.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      8d354f13
    • J
      blk-mq: turn hctx->run_work into a regular work struct · 27489a3c
      Jens Axboe 提交于
      We don't need the larger delayed work struct, since we always run it
      immediately.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      27489a3c
    • J
      block: add kblockd_schedule_work_on() · ee63cfa7
      Jens Axboe 提交于
      Add a helper to schedule a regular struct work on a particular CPU.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ee63cfa7
    • J
      workqueue: add cancel_work() · f72b8792
      Jens Axboe 提交于
      Like cancel_delayed_work(), but for regular work.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      Mehed-by: NTejun Heo <tj@kernel.org>
      Acked-by: NTejun Heo <tj@kernel.org>
      f72b8792
    • L
      Linux 4.8-rc4 · 3eab887a
      Linus Torvalds 提交于
      3eab887a
    • L
      Merge tag 'drm-fixes-for-4.8-rc4' of git://people.freedesktop.org/~airlied/linux · 25d0d91a
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "A bunch of fixes covering i915, amdgpu, one tegra and some core DRM
        ones.  Nothing too strange at this point"
      
      * tag 'drm-fixes-for-4.8-rc4' of git://people.freedesktop.org/~airlied/linux: (21 commits)
        drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
        drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION
        drm/amdgpu: skip TV/CV in display parsing
        drm/amdgpu: avoid a possible array overflow
        drm/amdgpu: fix lru size grouping v2
        drm/tegra: dsi: Enhance runtime power management
        drm/i915: Fix botched merge that downgrades CSR versions.
        drm/i915/skl: Ensure pipes with changed wms get added to the state
        drm/i915/gen9: Only copy WM results for changed pipes to skl_hw
        drm/i915/skl: Add support for the SAGV, fix underrun hangs
        drm/i915/gen6+: Interpret mailbox error flags
        drm/i915: Reattach comment, complete type specification
        drm/i915: Unconditionally flush any chipset buffers before execbuf
        drm/i915/gen9: Drop invalid WARN() during data rate calculation
        drm/i915/gen9: Initialize intel_state->active_crtcs during WM sanitization (v2)
        drm: Reject page_flip for !DRIVER_MODESET
        drm/amdgpu: fix timeout value check in amd_sched_job_recovery
        drm/amdgpu: fix sdma_v2_4_ring_test_ib
        drm/amdgpu: fix amdgpu_move_blit on 32bit systems
        drm/radeon: fix radeon_move_blit on 32bit systems
        ...
      25d0d91a