From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: Thomas Schoebel-Theuer <thomas.schoebel-theuer@1und1.de>
Cc: Michael Ziegel <Michael.Ziegel@1und1.de>,
Peter Scheitterer <Peter.Scheitterer@1und1.de>,
drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] Behaviour of verify: false positives -> true positives
Date: Wed, 1 Oct 2008 12:46:31 +0200 [thread overview]
Message-ID: <20081001104631.GD19381@soda.linbit> (raw)
In-Reply-To: <200810011116.41804.thomas.schoebel-theuer@1und1.de>
On Wed, Oct 01, 2008 at 11:16:41AM +0200, Thomas Schoebel-Theuer wrote:
> Hi Lars,
>
> I have two different patches, both based on your git version from 2008-09-11.
great.
> The first one implements the checksumming method while the second one
> implements the copy method proposed by you.
>
> I found that your suggestion was much more easier to implement than the
> checksumming method. However, the copy method works completely silently (you
> get no response whether a race on the data is actually taking place or not),
> while the checksumming method writes reports to the kernel log (so you can
> observe the behavior).
I briefly had a look at the copy method.
as private_bio is a clone of master_bio,
it shares its bvec, thus the pages.
you assign the copy pages to the bvec->bv_page
(you have to do that, master_bio->bvec->bv_page is used in sendpage)
but you don't restore the original pages before completion,
even free the pages already.
you
* potentially leak the original pages
* potentially double free the copy pages
as the submitter (file system, page cache, whatever)
in its completion callback may reference or free those.
did you try this on a debug kernel,
memory poisoning and page allocation debugging switched on?
(of course, that is not the kernel you want to use for
performance benchmarks).
you need to remember the original pages, and you need to restore them
before completion of the master bio.
for diagnostics, you can "memcmp" on that occasion as well.
and you probably need to increase the "emergency reserve" amount of
pre-allocated pages, to avoid resource starvation deadlocks.
you should use copy_page or copy_highpage.
for performance impact, assuming that your memory bandwidth is much
higher than your IO bandwidth, this will "only" increase CPU cycles.
which is probably ok on a generic file server, but may become critical
when running a data base directly on drbd.
so, when doing benchmarks, have a look at the cpu usage as well.
I'll have a look at the checksumming method later.
thanks again,
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
next prev parent reply other threads:[~2008-10-01 10:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 14:02 [Drbd-dev] Behaviour of verify: false positives -> true positives schoebel
2008-09-11 9:25 ` Lars Ellenberg
2008-09-11 9:37 ` Lars Ellenberg
2008-09-30 20:10 ` Lars Ellenberg
2008-10-01 9:16 ` Thomas Schoebel-Theuer
2008-10-01 10:46 ` Lars Ellenberg [this message]
2008-10-01 11:28 ` Thomas Schoebel-Theuer
2008-10-01 11:46 ` Lars Ellenberg
2008-10-01 12:49 ` Thomas Schoebel-Theuer
2008-10-01 14:59 ` Lars Ellenberg
2009-01-26 11:03 ` Lars Ellenberg
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=20081001104631.GD19381@soda.linbit \
--to=lars.ellenberg@linbit.com \
--cc=Michael.Ziegel@1und1.de \
--cc=Peter.Scheitterer@1und1.de \
--cc=drbd-dev@lists.linbit.com \
--cc=thomas.schoebel-theuer@1und1.de \
/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.