login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
4
Re: dm: check max_sectors in dm_merge_bvec (was: Re: dm: max_segments=1 if merge_bvec_fn is not supported)
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Mike Snitzer
Subject:
Re: dm: check max_sectors in dm_merge_bvec (was: Re: dm: max_segments=1 if merge_bvec_fn is not supported)
Date: Saturday, December 4, 2010 - 12:21 pm
On Sat, Dec 04 2010 at 11:03am -0500, Lars Ellenberg <lars.ellenberg@linbit.com> wrote:
quoted text
> On Sat, Dec 04, 2010 at 01:43:08AM -0500, Mike Snitzer wrote: > > > Given dm_set_device_limits() sets q->limits->max_sectors, > > shouldn't dm_merge_bvec() be using queue_max_sectors rather than > > queue_max_hw_sectors? > > > > blk_queue_max_hw_sectors() establishes that max_hw_sectors is the hard > > limit and max_sectors the soft. But AFAICT no relation is maintained > > between the two over time (even though max_sectors <= max_hw_sectors > > _should_ be enforced; in practice there is no blk_queue_max_sectors > > setter that uniformly enforces as much). > > Just for the record, in case someone finds this in the archives, > and wants to backport or base his own work on this: > > A long time ago, there was no .max_hw_sectors. Then max_hw_sectors got > introduced, but without accessor function. > > Before 2.6.31, there was no blk_queue_max_hw_sectors(), > only blk_queue_max_sectors(), which set both. > > 2.6.31 introduced some blk_queue_max_hw_sectors(), which _only_ set > max_hw_sectors, and enforced a lower limit of BLK_DEF_MAX_SECTORS, so > using that only, you have not been able to actually set lower limits > than 512 kB. With 2.6.31 to 2.6.33, inclusive, you still need to use > blk_queue_max_sectors() to set your limits. > > 2.6.34 finally dropped the newly introduced function again, > but renamed the other, so starting with 2.6.34 you need to use > blk_queue_max_hw_sectors(), which now basically has the function body > blk_queue_max_sectors() had up until 2.6.33. > > > dm_set_device_limits() will set q->limits->max_sectors to <= PAGE_SIZE > > if an underlying device has a merge_bvec_fn. Therefore, dm_merge_bvec() > > must use queue_max_sectors() rather than queue_max_hw_sectors() to check > > the appropriate limit. > > IMO, you should not do this. > max_sectors is a user tunable, capped by max_hw_sectors. > max_hw_sectors is the driver limit. > > Please set max_hw_sectors in dm_set_device_limits instead.
Right, good point.. will do (unless I happen upon a reason not to or someone else shouts). Thanks, Mike --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] dm: max_segments=1 if merge_bvec_fn is not supported
, Lars Ellenberg
, (Sat Mar 6, 2:10 pm)
Re: [PATCH] dm: max_segments=1 if merge_bvec_fn is not sup ...
, Neil Brown
, (Sun Mar 7, 10:33 pm)
Re: [PATCH] dm: max_segments=1 if merge_bvec_fn is not sup ...
, Mikulas Patocka
, (Mon Mar 8, 1:35 am)
Re: [PATCH] dm: max_segments=1 if merge_bvec_fn is not sup ...
, Lars Ellenberg
, (Mon Mar 8, 6:14 am)
Re: [PATCH] dm: max_segments=1 if merge_bvec_fn is not sup ...
, Andrew Morton
, (Thu Mar 18, 11:48 am)
Re: [PATCH] dm: max_segments=1 if merge_bvec_fn is not sup ...
, Neil Brown
, (Thu Mar 18, 2:48 pm)
[PATCH] dm: check max_sectors in dm_merge_bvec (was: Re: ...
, Mike Snitzer
, (Fri Dec 3, 11:43 pm)
Re: [PATCH] dm: check max_sectors in dm_merge_bvec (was: ...
, Lars Ellenberg
, (Sat Dec 4, 9:03 am)
Re: dm: check max_sectors in dm_merge_bvec (was: Re: dm: ...
, Mike Snitzer
, (Sat Dec 4, 12:21 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Andi Kleen
Re: - romsignature-checksum-cleanup-2.patch removed from -mm tree
Stefano Stabellini
Re: [PATCH 09/22] xen: Find an unbound irq number in reverse order (high to low).
git
:
Junio C Hamano
Re: Teach "git checkout" to use git-show-ref
Christian Jaeger
Re: Problem with Git.pm bidi_pipe methods
Linus Torvalds
[PATCH 1/7] Make unpack_trees_options bit flags actual bitfields
Jon Smirl
stgit: managing signed-off-by lines
Junio C Hamano
GIT 1.4.3-rc2
git-commits-head
:
Linux Kernel Mailing List
MIPS: Bonito64: Make Loongson independent from Bonito64 code.
Linux Kernel Mailing List
iwlwifi: initialize spinlock before use
Linux Kernel Mailing List
i2c-i801: Add Intel Cougar Point device IDs
Linux Kernel Mailing List
drm/i915: Add information on pinning and fencing to the i915 list debug.
Linux Kernel Mailing List
cirrusfb: GD5434 (aka SD64) support fixed
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
Richard Cochran
Re: [PATCH v3 3/3] ptp: Added a clock that uses the eTSEC found on the MPC85xx.
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Sathya Perla
[PATCH net-next-2.6] be2net: add multiple RX queue support
Changli Gao
Re: [PATCH 3/3] ifb: move tq from ifb_private
freebsd-current
:
Boris Samorodov
Re: twa + dump = sbwait
韓家標 Bill Hacker
Re: ZFS honesty
Bjoern A. Zeeb
Re: Can not boot 7.0-BETA3 with IPSEC
rmgls
man usb2_core(4)
Sam Leffler
Re: Lots of "ath0: bad series0 hwrate 0x1b" in 8.0-BETA2
Colocation donated by:
Syndicate