Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] Re: XFS on DRBD
Date: Tue, 27 Jul 2004 10:15:53 +0200	[thread overview]
Message-ID: <200407271015.53469.philipp.reisner@linbit.com> (raw)
In-Reply-To: <20040526073608.GA21855@infradead.org>

On Wednesday 26 May 2004 09:36, you wrote:
> XFS does I/O on slab-allocated pages, which not a lot other code in
> the kernel does, and it seems drbd doesn't like that.  Do you have
> a pointer to the drbd code for Linux 2.6 so I can take a look?

Hi Christoph,

Drbd reached release status and finally everything works, but we have a
rather uggly workaround for XFS.

We usually use sendpage() to send the data blocks over the network.
But when XFS hands us its slab-allocated pages over, we may not
use sendpage. 

  If we call sendpage on such a page it will crash, since sendpage()
  calls put_page() after the job is done.

So currently we have this code in drbd:

	/* PARANOIA. if this ever triggers,
	 * something in the layers above us is really kaputt.
	 *one roundtrip later:
	 * doh. it triggered. so XFS _IS_ really kaputt ...
	 * oh well...
	 */
	if ( (page_count(page) < 1) || PageSlab(page) ) {
		/* e.g. XFS meta- & log-data is in slab pages, which have a
		 * page_count of 0 and/or have PageSlab() set...
		 * FIXME: This is a workaround.
		 */
		++fallback;
		sent =  _drbd_no_send_page(mdev, page, offset, size);
		if (likely(sent > 0)) len -= sent;
		goto out;
	}

Jul 27 09:58:32 mary kernel: drbd:sendpage fallback/total: 1/5381
Jul 27 09:59:32 mary kernel: drbd:sendpage fallback/total: 6/138083
Jul 27 10:00:32 mary kernel: drbd:sendpage fallback/total: 11/258761
Jul 27 10:01:32 mary kernel: drbd:sendpage fallback/total: 13/260085
Jul 27 10:02:32 mary kernel: drbd:sendpage fallback/total: 22/354874
Jul 27 10:03:32 mary kernel: drbd:sendpage fallback/total: 27/475558
Jul 27 10:04:37 mary kernel: drbd:sendpage fallback/total: 31/520124
Jul 27 10:05:37 mary kernel: drbd:sendpage fallback/total: 43/591427
Jul 27 10:06:37 mary kernel: drbd:sendpage fallback/total: 51/708371
Jul 27 10:07:42 mary kernel: drbd:sendpage fallback/total: 58/780179
Jul 27 10:08:42 mary kernel: drbd:sendpage fallback/total: 73/815288
Jul 27 10:09:42 mary kernel: drbd:sendpage fallback/total: 87/926600

Christoph,

IMHO XFS should only pass pages down the IO path which have a correct
page_count. 

Which is the right forum to discuss this issue ?

-Philipp

-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :

       reply	other threads:[~2004-07-27  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200405251206.11287.philipp.reisner@linbit.com>
     [not found] ` <20040526073608.GA21855@infradead.org>
2004-07-27  8:15   ` Philipp Reisner [this message]
2004-07-27 18:32     ` [Drbd-dev] Re: XFS on DRBD 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=200407271015.53469.philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=hch@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox