All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Jeremy Higdon <jeremy@classic.engr.sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: changes to kiobuf support in 2.4.(?)4
Date: Thu, 2 Aug 2001 09:45:17 +0200	[thread overview]
Message-ID: <20010802094517.I29065@athlon.random> (raw)
In-Reply-To: <10108012254.ZM192062@classic.engr.sgi.com> <20010802084259.H29065@athlon.random> <andrea@suse.de> <10108020031.ZM229058@classic.engr.sgi.com>
In-Reply-To: <10108020031.ZM229058@classic.engr.sgi.com>; from jeremy@classic.engr.sgi.com on Thu, Aug 02, 2001 at 12:31:52AM -0700

On Thu, Aug 02, 2001 at 12:31:52AM -0700, Jeremy Higdon wrote:
> By "mmap callback", you're referring to the mmap entry in the file_operations
> structure?

yes.

> I am doing direct I/O.  I'm using the kiobuf to hold the page addresses
> of the user's data buffer, but I'm calling directly into my driver
> after doing the map_user_kiobuf() (I have a read/write request, a file
> offset, a byte count, and a set of pages to DMA into/out of, and that
> gets directly translated into a SCSI command).
> 
> It turns out that the old kmem_cache_alloc was very lightweight, so I
> could get away with doing it once per I/O request, so I would indeed
> profit by going back to a light weight kiobuf, or at least an optional
> allocation of the bh and blocks arrays (perhaps turn them into pointers
> to arrays?).

I see your problem and it's a valid point indeed. But could you actually
allocate the kiobuf in the file->f_iobuf pointer? I mean: could you
allocate it at open/close too?  That would be the way I prefer since you
would need to allocate the bh anyways later (but with a flood of
alloc/free). So if you could move the kiobufs allocation out of the fast
path you would get a benefit too I believe.

Andrea

  reply	other threads:[~2001-08-02  7:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02  5:55 changes to kiobuf support in 2.4.(?)4 Jeremy Higdon
2001-08-02  6:43 ` Andrea Arcangeli
2001-08-02  7:31   ` Jeremy Higdon
2001-08-02  7:45     ` Andrea Arcangeli [this message]
2001-08-02  8:10       ` Jeremy Higdon
2001-08-02  8:24         ` Andrea Arcangeli
2001-08-02  8:42           ` Jeremy Higdon
2001-08-02  9:11             ` Andrea Arcangeli
2001-08-02  9:25               ` Jeremy Higdon
2001-08-02 10:00                 ` Andrea Arcangeli
2001-08-02  8:23   ` Gerd Knorr
2001-08-03 11:32     ` Ingo Oeser
2001-08-03 12:45     ` Andrea Arcangeli

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=20010802094517.I29065@athlon.random \
    --to=andrea@suse.de \
    --cc=jeremy@classic.engr.sgi.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 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.