1. 01 Dec, 2012 1 commit
  2. 30 Nov, 2012 3 commits
    • Jens Axboe's avatar
      drbd: fixup after wait_even_lock_irq() addition to generic code · 2cecb730
      Jens Axboe authored
      Compiling drbd yields:
      
      drivers/block/drbd/drbd_state.c: In function ‘_conn_request_state’:
      drivers/block/drbd/drbd_state.c:1804:5: error: macro "wait_event_lock_irq" passed 4 arguments, but takes just 3
      drivers/block/drbd/drbd_state.c:1801:3: error: ‘wait_event_lock_irq’ undeclared (first use in this function)
      drivers/block/drbd/drbd_state.c:1801:3: note: each undeclared identifier is reported only once for each function it appears in
      drivers/block/drbd/drbd_state.c: At top level:
      drivers/block/drbd/drbd_state.c:1734:1: warning: ‘_conn_rq_cond’ defined but not used [-Wunused-function]
      
      Due to drbd having copied the MD definition for wait_event_lock_irq()
      as well. Kill them.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      2cecb730
    • Lukas Czerner's avatar
      loop: Limit the number of requests in the bio list · 7b5a3522
      Lukas Czerner authored
      Currently there is not limitation of number of requests in the loop bio
      list. This can lead into some nasty situations when the caller spawns
      tons of bio requests taking huge amount of memory. This is even more
      obvious with discard where blkdev_issue_discard() will submit all bios
      for the range and wait for them to finish afterwards. On really big loop
      devices and slow backing file system this can lead to OOM situation as
      reported by Dave Chinner.
      
      With this patch we will wait in loop_make_request() if the number of
      bios in the loop bio list would exceed 'nr_congestion_on'.
      We'll wake up the process as we process the bios form the list. Some
      threshold hysteresis is in place to avoid high frequency oscillation.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reported-by: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7b5a3522
    • Lukas Czerner's avatar
      wait: add wait_event_lock_irq() interface · eed8c02e
      Lukas Czerner authored
      New wait_event{_interruptible}_lock_irq{_cmd} macros added. This commit
      moves the private wait_event_lock_irq() macro from MD to regular wait
      includes, introduces new macro wait_event_lock_irq_cmd() instead of using
      the old method with omitting cmd parameter which is ugly and makes a use
      of new macros in the MD. It also introduces the _interruptible_ variant.
      
      The use of new interface is when one have a special lock to protect data
      structures used in the condition, or one also needs to invoke "cmd"
      before putting it to sleep.
      
      All new macros are expected to be called with the lock taken. The lock
      is released before sleep and is reacquired afterwards. We will leave the
      macro with the lock held.
      
      Note to DM: IMO this should also fix theoretical race on waitqueue while
      using simultaneously wait_event_lock_irq() and wait_event() because of
      lack of locking around current state setting and wait queue removal.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      eed8c02e
  3. 26 Nov, 2012 2 commits
  4. 23 Nov, 2012 5 commits
  5. 12 Nov, 2012 1 commit
  6. 09 Nov, 2012 28 commits