17 Mar, 2011
5 commits
-
MD and DM create a new bio_set for every metadevice. Each bio_set has an
integrity mempool attached regardless of whether the metadevice is
capable of passing integrity metadata. This is a waste of memory.Instead we defer the allocation decision to MD and DM since we know at
metadevice creation time whether integrity passthrough is needed or not.Automatic integrity mempool allocation can then be removed from
bioset_create() and we make an explicit integrity allocation for the
fs_bio_set.Signed-off-by: Martin K. Petersen
Reported-by: Zdenek Kabelac
Acked-by: Mike Snitzer
Signed-off-by: Jens Axboe -
'write_op' was still used, even though it was always WRITE_SYNC now.
Add plugging around the cases where it submits IO, and flush them
before we end up waiting for that IO.Signed-off-by: Jens Axboe
-
'write_op' was still used, even though it was always WRITE_SYNC now.
Add plugging around the cases where it submits IO, and flush them
before we end up waiting for that IO.Signed-off-by: Jens Axboe
-
It used WRITE_SYNC_PLUG before and potentially submits a batch
of IO, so lets enable plugging for this case.Signed-off-by: Jens Axboe
-
This recovers a performance regression caused by the removal
of the per-device plugging.Signed-off-by: Jens Axboe
12 Mar, 2011
4 commits
-
There are two kind of times that tasks are not charged for: the first
seek and the extra time slice used over the allocated timeslice. Both
of these exported as a new unaccounted_time stat.I think it would be good to have this reported in 'time' as well, but
that is probably a separate discussion.Signed-off-by: Justin TerAvest
Signed-off-by: Jens Axboe -
They used an older prototype, fix it up.
Reported-by: Randy Dunlap
Signed-off-by: Jens Axboe -
barrier is already removed, so remove the obsolete comments
in blkdev_issue_zeroout.Cc: Jens Axboe
Signed-off-by: Tao Ma
Signed-off-by: Jens Axboe -
In blk_add_trace_rq, we only chose the minor 2 bits from
request's cmd_flags and did some check for discard.
so most of other flags(e.g, REQ_SYNC) are missing.For example, with a sync write after blkparse we get:
8,16 1 1 0.001776503 7509 A WS 1349632 + 1024 cmd_flags directly to __blk_add_trace.With this patch, after a sync write we get:
8,16 1 1 0.001776900 5425 A WS 1189888 + 1024
Acked-by: Jeff Moyer
Signed-off-by: Jens Axboe
10 Mar, 2011
29 commits
-
Conflicts:
block/blk-core.c
block/blk-flush.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
fs/nilfs2/btnode.c
fs/nilfs2/mdt.cSigned-off-by: Jens Axboe
-
Use plug in throttle dispatch also as we are dispatching a bunch of
bios in throttle context and some of them might merge.Signed-off-by: Vivek Goyal
Signed-off-by: Jens Axboe -
With the plugging now being explicitly controlled by the
submitter, callers need not pass down unplugging hints
to the block layer. If they want to unplug, it's because they
manually plugged on their own - in which case, they should just
unplug at will.Signed-off-by: Jens Axboe
-
This should be useless now that we have on-stack plugging. So lets just
kill it.Signed-off-by: Jens Axboe
-
Signed-off-by: Shaohua Li
Signed-off-by: Jens Axboe -
Signed-off-by: Jens Axboe
-
Signed-off-by: Jens Axboe
-
Signed-off-by: Jens Axboe
-
Code has been converted over to the new explicit on-stack plugging,
and delay users have been converted to use the new API for that.
So lets kill off the old plugging along with aops->sync_page().Signed-off-by: Jens Axboe
-
This patch adds support for creating a queuing context outside
of the queue itself. This enables us to batch up pieces of IO
before grabbing the block device queue lock and submitting them to
the IO scheduler.The context is created on the stack of the process and assigned in
the task structure, so that we can auto-unplug it if we hit a schedule
event.The current queue plugging happens implicitly if IO is submitted to
an empty device, yet callers have to remember to unplug that IO when
they are going to wait for it. This is an ugly API and has caused bugs
in the past. Additionally, it requires hacks in the vm (->sync_page()
callback) to handle that logic. By switching to an explicit plugging
scheme we make the API a lot nicer and can get rid of the ->sync_page()
hack in the vm.Signed-off-by: Jens Axboe
-
It was always abuse to reuse the plugging infrastructure for this,
convert it to the (new) real API for delaying queueing a bit. A
default delay of 3 msec is defined, to match the previous
behaviour.Signed-off-by: Jens Axboe
-
It was always abuse to reuse the plugging infrastructure for this,
convert it to the (new) real API for delaying queueing a bit.Signed-off-by: Jens Axboe
Acked-by: David S. Miller -
Currently we use plugging for that, but as plugging is going away,
we need an alternative mechanism.Signed-off-by: Jens Axboe
-
Convert two staging drivers - blkvsc_drv and cyasblkdev_block - from
->media_changed() to ->check_events(). The former always indicated
media changed while the latter always indicated media not changed.
Not sure what the drivers are trying to achieve but keep the original
behavior.Signed-off-by: Tejun Heo
Acked-by: Greg Kroah-Hartman
Cc: Jens Axboe
Cc: Kay Sievers -
Convert from ->media_changed() to ->check_events().
pktcdvd needs to forward all event related operations to the
underlying device. Forward ->check_events() instead of
->media_changed() and inherit disk->[async_]events.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Peter Osterlund -
umem doesn't implement media changed detection and there's no need to
implement dummy callback anymore. Remove it.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
Convert from ->media_changed() to ->check_events().
s390/tape_block buffers media changed state and clears it on
revalidation. It will behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Martin Schwidefsky
Cc: Heiko Carstens -
Convert from ->media_changed() to ->check_events().
i2o_block buffers media changed state and clears it after reporting.
It will behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Markus Lidel -
Convert from ->media_changed() to ->check_events().
xsysace buffers media changed state and clears it on revalidation. It
will behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Acked-by: Grant Likely
Cc: Jens Axboe
Cc: Kay Sievers -
Convert from ->media_changed() to ->check_events().
ub buffers media changed state and clears it on revalidation. It will
behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Pete Zaitcev -
Convert from ->media_changed() to ->check_events().
Both swim and swim3 buffer media changed state and clear it on
revalidation. They will behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Laurent Vivier
Cc: Benjamin Herrenschmidt -
Convert from ->media_changed() to ->check_events().
DAC960 media change notification seems to be one way (once set, never
cleared) and will generate spurious events when polled once the
condition triggers.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
Convert paride drivers from ->media_changed() to ->check_events().
pcd and pd buffer and clear events after reporting; however, pf
unconditionally reports MEDIA_CHANGE and will generate spurious events
when polled.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
Cc: Tim Waugh -
Convert gdrom and viocd from ->media_changed() to ->check_events().
It's unclear how the conditions are cleared and it's possible that it
may generate spurious events when polled.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
Convert the floppy drivers from ->media_changed() to ->check_events().
Both floppy and ataflop buffer media changed state bit and clear them
on revalidation and will behave correctly with kernel event polling.I can't tell how amiflop clears its event and it's possible that it
may generate spurious events when polled.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
Convert ->media_changed() to the new ->check_events() method. The
conversion is mostly mechanical. The only notable change is that
cdrom now doesn't generate any event if @slot_nr isn't CDSL_CURRENT.
It used to return -EINVAL which would be treated as media changed. As
media changer isn't supported anyway, this doesn't make any
difference.This makes ide emit the standard disk events and allows kernel event
polling. Currently, only MEDIA_CHANGE event is implemented. Adding
support for EJECT_REQUEST shouldn't be difficult; however, given that
ide driver is already deprecated, it probably is best to leave it
alone.Signed-off-by: Tejun Heo
Acked-by: Jens Axboe
Cc: Kay Sievers
Cc: "David S. Miller"
Cc: linux-ide@vger.kernel.org -
Not all block drivers clear events immediately after reporting. Some
do so in ->revalidate_disk() or other steps during ->open(). There is
a slim chance event poll may happen between the clearing event check
from check_disk_change() and the actual clearing of the events which
would result in spurious events.Block event checks while block device open is in progress. There is
no need to kick explicit event check afterwards as events are always
checked during open.-v2: The original patch could have called disk_unblock_events() with
an already released or %NULL @disk causing oops. Fixed by making
sure references are put after disk_unblock_events() is called.
It also makes the error path of __blkdev_get() a bit simpler.
This problem was reported by Jens.Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
The block event mechanism currently always checks events when the
device is being closed regardless of the open mode. The intention was
to allow detection of EJECT_REQUEST when a device is closed whether
disk event polling is enabled or not.This is unnecessary as, for devices of interest, events are checked
from either userland or kernel and in the former case ->check_events()
is performed on open of each poll attempt anyway. Furthermore, this
unconditional event check on close makes the code susceptible to event
loop if the block driver doesn't clear reported events correctly - an
event triggers userland to open and close the device which in turn
causes another event, rinse and repeat.Check events on close only if it was blocked by excl write open.
Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers -
Currently, disk_unblock_events() implicitly kick event check if the
block count reaches zero. This behavior is not described in the
comment and hinders with future changes. Make the unblocker
explicitly check events by calling disk_check_events() as necessary.This patch doesn't cause any behavior difference.
Signed-off-by: Tejun Heo
Cc: Jens Axboe
Cc: Kay Sievers
09 Mar, 2011
1 commit
-
We've found that we still get good, useful isolation at weights this
low. I'd like to adjust the minimum so that any other changes can take
these values into account.Signed-off-by: Justin TerAvest
Acked-by: Vivek Goyal
Signed-off-by: Jens Axboe
08 Mar, 2011
1 commit
-
The block integrity subsystem no longer uses the bio_vec slabs so this
code can safely be compiled in.Signed-off-by: Martin K. Petersen
Signed-off-by: Jens Axboe