From: Nathan Scott <nathans@sgi.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] ramdisk blocksize Kconfig entry
Date: Wed, 12 Jul 2006 09:04:17 +1000 [thread overview]
Message-ID: <20060712090417.C1725755@wobbly.melbourne.sgi.com> (raw)
In-Reply-To: <44B415FE.1010700@zytor.com>; from hpa@zytor.com on Tue, Jul 11, 2006 at 02:19:58PM -0700
On Tue, Jul 11, 2006 at 02:19:58PM -0700, H. Peter Anvin wrote:
> Nathan Scott wrote:
> > This patch makes the ramdisk blocksize configurable at kernel
> > compilation time rather than only at boot or module load time,
> > like a couple of the other ramdisk options. I found this handy
> > awhile back but thought little of it, until recently asked by a
> > few of the testing folks here to be able to do the same thing
> > for their automated test setups.
> >
> > The Kconfig comment is largely lifted from comments in rd.c,
> > and hopefully this will increase the chances of making folks
> > aware that the default value often isn't a great choice here
> > (for increasing values of PAGE_SIZE, even moreso).
>
> This seems a bit odd to me... the sizes of most block devices is set by
> the filesystem, not hard-coded; the need for this implies something more
> fundamental is wrong.
The ramdisk driver is using this "blocksize" as what, in some other areas
of the block layer (and in XFS, but thats irrelevent here), is termed the
hard sector size - i.e. minimum IO size allowed to the device. This gets
used for direct I/O size and alignment checking at the device level (the
block size of the filesystem sitting above the ramdisk has to be equal to
or greater than the device sector size).
The driver also uses this value for i_blkbits on individual block device
inodes (in rd_open), which in turn means buffer_heads attached to the
page cache pages which form the backing store for this device are sized
based on this, which potentially means many buffer_heads to a page. This
may not be what someone using it might have expected/wanted.
But I don't think these things are fundamental problems in the ramdisk
driver, rather design choices, and people using it should be aware of
the tradeoffs... what were you thinking of there in terms of something
more fundamental being wrong?
cheers.
--
Nathan
prev parent reply other threads:[~2006-07-11 23:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 7:17 Nathan Scott
2006-07-11 21:19 ` H. Peter Anvin
2006-07-11 23:04 ` Nathan Scott [this message]
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=20060712090417.C1725755@wobbly.melbourne.sgi.com \
--to=nathans@sgi.com \
--cc=akpm@osdl.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®