login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
29
Re: [PATCH] Optimize lock in queue unplugging
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Jens Axboe <jens.axboe@...>
To: Mikulas Patocka <mpatocka@...>
Cc: <linux-kernel@...>, Mike Anderson <andmike@...>, Alasdair Graeme Kergon <agk@...>
Subject:
Re: [PATCH] Optimize lock in queue unplugging
Date: Tuesday, April 29, 2008 - 4:05 pm
On Tue, Apr 29 2008, Mikulas Patocka wrote:
quoted text
> > > On Tue, 29 Apr 2008, Jens Axboe wrote: > > >On Tue, Apr 29 2008, Mikulas Patocka wrote: > >>Hi > >> > >>Mike Anderson was doing an OLTP benchmark on a computer with 48 physical > >>disks mapped to one logical device via device mapper. > >> > >>He found that there was a slowdown on request_queue->lock in function > >>generic_unplug_device. The slowdown is caused by the fact that when some > >>code calls unplug on the device mapper, device mapper calls unplug on all > >>physical disks. These unplug calls take the lock, find that the queue is > >>already unplugged, release the lock and exit. > >> > >>With the below patch, performance of the benchmark was increased by 18% > >>(the whole OLTP application, not just block layer microbenchmarks). > >> > >>So I'm submitting this patch for upstream. I think the patch is correct, > >>because when more threads call simultaneously plug and unplug, it is > >>unspecified, if the queue is or isn't plugged (so the patch can't make > >>this worse). And the caller that plugged the queue should unplug it > >>anyway. (if it doesn't, there's 3ms timeout). > > > >Where were these unplug calls coming from? The block layer will > >generally only unplug when it is already unplugged, so if you are seeing > >so many unplug calls that the patch redues overhead by as much > >described, perhaps the callsite is buggy? > > > >-- > >Jens Axboe > > unplug is called on any wait_on_buffer (and similar calls) > __wait_on_buffer -> sync_buffer -> blk_run_address_space -> > blk_run_backing_dev -> bdi->unplug_io_fn(bdi, page); > > (I'm not sure that this was the IBM's case, I'm just guessing - this is > the most obvious example where unplug is called repeatedly) > > > There is not any test that the queue is plugged and there shouldn't be. If > you have this situation > > dm-linear(unplugged) -> physical-disk(plugged) > > then uplung should be called on dm-linear (that will call dm-unplug method > dm_unplug_all and that will unplug the disk). If you add the test of > plugged queue to the upper layer, you mess this situation with stacked > drivers completely. > > The test for already plugged queue should be at the lowest physical device > driver, not in upper layers.
Fair enough, I'll put the patch under closer scrutiny and queue it up. Thanks! -- Jens Axboe --
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] Optimize lock in queue unplugging
, Mikulas Patocka
, (Tue Apr 29, 3:12 pm)
Re: [PATCH] Optimize lock in queue unplugging
, Jens Axboe
, (Tue Apr 29, 3:25 pm)
Re: [PATCH] Optimize lock in queue unplugging
, Mike Anderson
, (Tue Apr 29, 4:29 pm)
Re: [PATCH] Optimize lock in queue unplugging
, Jens Axboe
, (Wed Apr 30, 3:14 am)
Re: [PATCH] Optimize lock in queue unplugging
, Mikulas Patocka
, (Wed Apr 30, 9:54 am)
Re: [PATCH] Optimize lock in queue unplugging
, Jens Axboe
, (Sun May 4, 3:11 pm)
Re: [PATCH] Optimize lock in queue unplugging
, Mikulas Patocka
, (Mon May 5, 12:01 am)
Re: [PATCH] Optimize lock in queue unplugging
, Jens Axboe
, (Wed May 7, 3:45 am)
Re: [PATCH] Optimize lock in queue unplugging
, Alasdair G Kergon
, (Wed Apr 30, 6:38 am)
Re: [PATCH] Optimize lock in queue unplugging
, Mikulas Patocka
, (Tue Apr 29, 4:02 pm)
Re: [PATCH] Optimize lock in queue unplugging
, Jens Axboe
, (Tue Apr 29, 4:05 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Joe Perches
[PATCH 020/148] include/asm-x86/current_32.h: checkpatch cleanups - formatting only
Ingo Molnar
Re: [PATCH] x86: introduce page_size_mask for 64bit
Ian Kumlien
[BUG] sky2 errors in 2.6.23-rc9-git1
Greg Kroah-Hartman
[PATCH 07/79] device create: coda: convert device_create to device_create_drvdata
git
:
Jean-Luc Herren
Re: [PATCH] Color support added to git-add--interactive.
Imran M Yousuf
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Petr Baudis
repo.or.cz wishes?
Junio C Hamano
Re: [PATCH] git-submodule - Add 'foreach' subcommand
openbsd-misc
:
Paul de Weerd
Re: Problem with rtadvd/rtsol
Richard Stallman
Real men don't attack straw men
Kevin Neff
Patching a SSH 'Weakness'
Lars Hansson
Re: Code signing in OpenBSD
linux-netdev
:
Julius Volz
[PATCH RFC 23/24] IPVS: Small address/af usage fixups
Jarek Poplawski
Re: loaded router, excessive getnstimeofday in oprofile
David Woodhouse
Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
Max Krasnyansky
[PATCH] tun: Fix/rewrite packet filtering logic
Latest forum posts
high memory
1 day ago
Linux kernel
semaphore access speed
1 day ago
Applications and Utilities
the kernel how to power off the machine
1 day ago
Linux kernel
Easter Eggs in windows XP
1 day ago
Windows
Shared swap partition
1 day ago
Linux general
Root password
1 day ago
Linux general
Where/when DNOTIFY is used?
1 day ago
Linux kernel
How to convert Linux Kernel built-in module into a loadable module
1 day ago
Linux kernel
Linux 2.6.24 and I/O schedulers
1 day ago
Linux kernel
USB Driver -- Interrupt Polling -- A Little Help Please
1 day ago
Linux general
Show all forums...
Recent Tags
Linux
2.6.27-rc8
2.6.27
-rc
quote
Linus Torvalds
bugs
-rc8
Intel
more tags
Colocation donated by:
Who's online
There are currently
2 users
and
1119 guests
online.
Online users
anitemp
strcmp
Syndicate
speck-geostationary