From: Phillip Susi <psusi@ubuntu.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Maxim Patlasov <maxim.patlasov@gmail.com>,
joe@perches.com, kzak@redhat.com, linux-kernel@vger.kernel.org,
jaxboe@fusionio.com
Subject: Re: [PATCH 1/2] Add partition resize function to BLKPG ioctl
Date: Thu, 26 Jan 2012 15:35:42 -0500 [thread overview]
Message-ID: <4F21B91E.90106@ubuntu.com> (raw)
In-Reply-To: <20120126190114.GG1891@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/26/2012 2:01 PM, Vivek Goyal wrote:
> I thought update will always happen with mutex lock held. That's
> what sequence counter expects so that two updaters don't race. Just
> that while updating under mutex lock, we still need to use sequence
> counter mecahinsm to update values so that any readers out there
> not holding mutex don't get confused.
Yes, but holding the mutex while writing does no good for the reader.
When the writer doesn't use the seqcounter, then the reader that is
using it is not actually protected.
> Right now readers can afford not to take lock. Introducing mutex on
> read side with just add to the cost. Especially IO submission path
> where we map IO to a partitiona and we wouldn't want to take
> mutexes there?
Yes, it does look like readers can't afford that overhead.
> Are you still pursuing this pathset? Sounds like a useful
> functionality to have.
Yes, but I hadn't yet heard back about my question about this being a
broader issue that is already a bug in the kernel because things like
loop and md already change nr_sects ( on the whole disk partition )
without any protection.
Maybe what we need is a read/write lock on struct genhd, then all
readers need to acquire the read lock, which should only slow them
down if they collide with a writer.
Another idea that I had but have not yet checked to see if it is
actually feasible is to copy the struct genhd, change the size of the
copy, and replace the existing one since updating the pointer will be
atomic.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPIbkeAAoJEJrBOlT6nu75Bx8IAKgTgA4czpng+JaQkja7n8j9
8B+e+9Asnyp/ND3qkxdUHwmRwJxmC+fJV9PVT84neoBHugN63rX3afc4KGJp5elg
k21kziCy46cbIOOeYQDkTZnkHoqHL3dd1sJhO6tv7bDjtRKW0PVY855sKQKW8cNk
zjX0WA+iaePs0+Yhd921MwKisRyWtpUr5Sm3Ib0h4kTjRKL7Nyk6cHNH516HpuD2
mXTDCbK5eRhljiadd7igCbbUQNVyFNHm3JGcgLLw35dnarzobZFDlrN1ybXoPExC
31FhDG2Vbo5kLlUNibIsuuf9DoYzBilMTyE/aHN1EtjkTk8bKMg3lZoUi1sVV7c=
=TMsc
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-01-26 20:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 17:06 [PATCH 1/2] Add partition resize function to BLKPG ioctl Maxim Patlasov
2011-12-30 0:09 ` Phillip Susi
2012-01-01 21:49 ` Phillip Susi
2012-01-26 19:01 ` Vivek Goyal
2012-01-26 20:35 ` Phillip Susi [this message]
2012-01-26 21:04 ` Vivek Goyal
2012-01-26 21:48 ` Phillip Susi
2012-01-30 15:49 ` Vivek Goyal
[not found] <cover.1322709471.git.psusi@cfl.rr.com>
2011-12-01 3:23 ` Phillip Susi
2011-12-08 12:30 ` Karel Zak
2011-12-08 14:22 ` Phillip Susi
2011-12-08 15:16 ` Karel Zak
2011-12-08 15:25 ` Phillip Susi
2011-12-08 15:58 ` Vivek Goyal
2011-12-08 16:06 ` Phillip Susi
2011-12-08 16:28 ` Vivek Goyal
2011-12-08 16:55 ` Phillip Susi
2011-12-09 2:53 ` Phillip Susi
2011-12-12 14:53 ` Vivek Goyal
2011-12-12 17:43 ` Phillip Susi
2011-12-12 17:49 ` Joe Perches
2011-12-12 18:04 ` Vivek Goyal
2011-12-13 0:15 ` Phillip Susi
2011-12-13 0:16 ` Phillip Susi
2011-12-19 20:25 ` Vivek Goyal
2011-12-21 1:53 ` Phillip Susi
2011-12-21 1:54 ` Phillip Susi
2011-12-21 20:46 ` Vivek Goyal
2011-12-24 21:36 ` Phillip Susi
2011-12-24 22:21 ` Phillip Susi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F21B91E.90106@ubuntu.com \
--to=psusi@ubuntu.com \
--cc=jaxboe@fusionio.com \
--cc=joe@perches.com \
--cc=kzak@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxim.patlasov@gmail.com \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.