public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] indirect function calls elimination in IO scheduler
Date: Mon, 17 Oct 2005 21:40:17 +0200	[thread overview]
Message-ID: <20051017194016.GB2811@suse.de> (raw)
In-Reply-To: <200510171925.j9HJPKg12681@unix-os.sc.intel.com>

On Mon, Oct 17 2005, Chen, Kenneth W wrote:
> Jens Axboe wrote on Monday, October 17, 2005 10:59 AM
> > you cannot ref count a statically embedded structure. It has to be
> > dynamically allocated.
> 
> I'm confused.  For every block device queue, there is one unique
> elevator_t structure allocated via kmalloc.  And vice versa, one
> elevator_t has only one request_queue points to it. This elevator_t
> structure is per q since it has pointer to per-queue elevator
> private data.

For every _non_ stacked queue there is an elevator_t structure attached.
That's a seperate point, but it means that embedding the elevator inside
the queue wastes memory (104 bytes per queue on this box I'm typing on)
for dm/md devices.

> Since it is always one to one relationship, ref count is predictable
> and static.  I see there are ref count on q->elevator, But it is
> always 2: one from object instantiation and one from adding an sysfs
> hierarchy directory.  In this case, I don't see the difference.
> Am I missing something?

The reference count does exist outside of the queue getting gotten/put,
the switching being one of them. Tejun has patches for improving the
switching, so it would be possible to keep two schedulers alive for the
queue for the duration of the switch.

-- 
Jens Axboe


  reply	other threads:[~2005-10-17 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 17:01 Re:[PATCH 1/1] indirect function calls elimination in IO scheduler Ananiev, Leonid I
2005-10-17 17:58 ` [PATCH " Jens Axboe
2005-10-17 19:25   ` Chen, Kenneth W
2005-10-17 19:40     ` Jens Axboe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-12-01 17:18 Ananiev, Leonid I
2005-10-20  5:11 Ananiev, Leonid I
2005-10-19 13:08 Ananiev, Leonid I
2005-10-19 13:56 ` Arjan van de Ven
2005-10-18 13:15 Ananiev, Leonid I
2005-10-17 16:12 Ananiev, Leonid I
2005-10-18  2:44 ` Randy.Dunlap
2005-10-16 22:28 Ananiev, Leonid I
2005-10-17  3:41 ` [PATCH " Randy.Dunlap

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=20051017194016.GB2811@suse.de \
    --to=axboe@suse.de \
    --cc=kenneth.w.chen@intel.com \
    --cc=leonid.i.ananiev@intel.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