9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] aux/acidleak pool pathology
Date: Thu, 21 May 2009 14:04:13 -0400	[thread overview]
Message-ID: <ad616ea212ba4a0741b9343627cd4135@quanstro.net> (raw)
In-Reply-To: <dd6fe68a0905211019p3c45859cm457c70dc3828198c@mail.gmail.com>

> part is requiring the array to be contiguous in the
> first place, but you can't qsort a linked list.

i've sidestepped this problem a few times by building a
linked list and later building an array to sort.  then, if
necessary, relinking the list.  the big allocation is then
done only once.

even after changing to a power-of-two allocation and starting
with 8k items, aux/acidleak still takes 400mb on a 40mb proc
with only 155278 bytes actually allocated (in the target process).

is the a chance that pool is not packing the small
allocations together well?

> if upas/fs is allocating arbitrarily large buffers,
> then its allocation behavior is broken too.

there are a fixed number of large buffers.  up to 15 messages
and mdir uses dirreadall so it can qsort.  the qsort is easy enough
to eliminate, but it's more difficult to bound message buffers.

- erik



  reply	other threads:[~2009-05-21 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 16:06 erik quanstrom
2009-05-21 16:35 ` Russ Cox
2009-05-21 16:54   ` erik quanstrom
2009-05-21 16:57     ` erik quanstrom
2009-05-21 17:19     ` Russ Cox
2009-05-21 18:04       ` erik quanstrom [this message]
2009-05-21 18:49         ` Russ Cox
2009-05-22  2:13           ` erik quanstrom
2009-05-22 16:52             ` Joel C. Salomon
2009-05-22 17:13               ` erik quanstrom

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=ad616ea212ba4a0741b9343627cd4135@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).