public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: 2 times faster rawio and several fixes (2.4.3aa3)
Date: Fri, 6 Apr 2001 19:36:21 +0200	[thread overview]
Message-ID: <20010406193621.M28118@athlon.random> (raw)
In-Reply-To: <20010406183440.B28118@athlon.random> <20010406190701.H28118@athlon.random> <20010406190232.A20258@gruyere.muc.suse.de>
In-Reply-To: <20010406190232.A20258@gruyere.muc.suse.de>; from ak@suse.de on Fri, Apr 06, 2001 at 07:02:32PM +0200

On Fri, Apr 06, 2001 at 07:02:32PM +0200, Andi Kleen wrote:
> On Fri, Apr 06, 2001 at 07:07:01PM +0200, Andrea Arcangeli wrote:
> > However we can probably stay with the 512k atomic I/O otherwise the iobuf
> > structure will grow again of an order of 2. With 512k of atomic I/O the kiovec
> > structure is just 8756 in size (infact probably I should allocate some of the
> > structures dynamically instead of statics inside the kiobuf.. as it is now
> > with my patch it's not very reliable as it needs an allocation of order 2).
> 
> 8756bytes wastes most of an order 2 allocation. Wouldn't it make more sense to 
> round it up to 16k to use the four pages fully ?  (if the increased atomic

I prefer to get rid of the order 2 allocation to avoid having to deal with
fragmentation. The patch introduces arrays takes 1 page each (on x86 and alpha)
if the atomic IO is 512k so I can allocate them with a separate kmalloc.

OTOH on x86-64 we have PAGE_SIZE 4k and 8byte words so maybe I should use
vmalloc instead? Performance of vmalloc is not an issue because those
allocations doesn't happen anymore in any fast path, only worry in using
vmalloc are the additional global 3 tlb entries (but OTOH also with kmalloc
there's the chance the code will use a few more global tlb entries if the
memory returned for all the kiovec structures doesn't all fit in the same
2/4Mbytes naturally aligned area). so probably I will take the vmalloc way
that is more generic and it shouldn't hurt perormance (I will measure that
to be sure though).

Andrea

  reply	other threads:[~2001-04-06 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-06 16:34 2 times faster rawio and several fixes (2.4.3aa3) Andrea Arcangeli
2001-04-06 17:07 ` Andrea Arcangeli
2001-04-06 17:02   ` Andi Kleen
2001-04-06 17:36     ` Andrea Arcangeli [this message]
2001-04-06 18:22       ` 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=20010406193621.M28118@athlon.random \
    --to=andrea@suse.de \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --cc=torvalds@transmeta.com \
    /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