Re: CONFIG_BIGMEM and rawio

Stephen C. Tweedie (sct@redhat.com)
Thu, 2 Sep 1999 23:05:23 +0100 (BST)


Hi,

On Thu, 2 Sep 1999 12:26:03 +0200 (CEST), Andrea Arcangeli
<andrea@suse.de> said:

> On Thu, 2 Sep 1999, Manfred wrote:
>> Im reading the BIGMEM codes, and it seems that BIGMEM and rawio are
>> incompatible.
>> Is that correct?

> The thing is not black and white. It can be compatible or incompatible, it
> only depends about the internal details of the blockdevice driver and on
> which memory you are going to do raw-io. It only depends on the source and
> on the destination of the raw-IO. If both the source and the destination
> are OK, then you can do raw-io fine also with BIGMEM enabled.

Unfortunately an application has no control over allocation of its
pages, so this basically makes raw IO useless right now with BIGMEM.

What I plan to do is to allow ll_rw_block to support bounce-buffers
transparently for devices which cannot safely access the high memory
locations, but at the same time to let devices tell the kernel when it
is safe to do the IO directly. We _have_ to have bounce buffers of some
description. Our only choice is whether we do it separately in the raw
code and the swapper (and later on in the page cache when we allow that
into high memory) or do it, once, in ll_rw_block.

> The current code is just completly stable, you can't harm the kernel
> trying to do raw-io on the wrong place.

It just harms applications. :(

> For example if you know for sure that the blockdevice where you want to
> write in raw-io mode does DMA driven I/O, then you can just now do raw-io
> from or to bigmemory _fine_ on _such_ blockdevice using 2.3.16. The only
> thing you have to do to experiment this, is to comment out these lines in
> buffer.c of 2.3.16:

Exactly why it needs to be per-device. Once the high memory limit is
raised above 4G, this will become even more important as not all devices
will physically be able to support 64-bit PCI addressing.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/