All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST
Date: Wed, 10 Mar 2010 13:20:36 +0100	[thread overview]
Message-ID: <m3tyso1i7f.fsf@trasno.mitica> (raw)
In-Reply-To: <alpine.LNX.2.00.1003101507420.1707@linmac> (malc's message of "Wed, 10 Mar 2010 15:08:09 +0300 (MSK)")

malc <av1474@comtv.ru> wrote:
> On Wed, 10 Mar 2010, Juan Quintela wrote:
>
>> malc <av1474@comtv.ru> wrote:
>> > On Wed, 10 Mar 2010, Juan Quintela wrote:
>> 
>> >> -        for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
>> >> +        QTAILQ_FOREACH(ioh, &io_handlers, next) {
>> >>              if (ioh->fd == fd)
>> >>                  goto found;
>> >>          }
>> >>          ioh = qemu_mallocz(sizeof(IOHandlerRecord));
>> >> -        ioh->next = first_io_handler;
>> >> -        first_io_handler = ioh;
>> >> +        QTAILQ_INSERT_TAIL(&io_handlers, ioh, next);
>> >
>> > The old code inserted at the head, didn't it?
>> 
>> Sorry, you are right, it shouldn't matter too much, but it is a change.
>
> If it did, why queue instead of list?

Arbitrary.  Example conversion nearer was QTAIL.

Use is:
- insert at the beggining
- search for removal
- loop all list

insert/searchs should be less than loops.  I am more
interested/intrigued if setting more fd's in the select call could
change behaviour.

Changing to QLIST is search/replace, no big deal.

>> 
>> Later, Juan.
>> 

  reply	other threads:[~2010-03-10 12:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 10:03 [Qemu-devel] [PATCH v2 00/14] Clear fd handlers Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 01/14] Convert io handlers to QLIST Juan Quintela
2010-03-10 11:57   ` malc
2010-03-10 12:06     ` [Qemu-devel] " Juan Quintela
2010-03-10 12:08       ` malc
2010-03-10 12:20         ` Juan Quintela [this message]
2010-03-10 12:54           ` malc
2010-03-10 13:03             ` Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 02/14] remove useless cast Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 03/14] rename IOCanRWHandler to IOCanReadHandler Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 04/14] bt: remove bt_host_read_poll() Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 05/14] Handle deleted IOHandlers in a single pass Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 06/14] tap: insert tap_can_send() into tap_send() Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 07/14] qemu-char:stdio insert poll call into read one Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 08/14] qemu-char:tcp " Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 09/14] qemu-char:fd " Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 10/14] qemu-char:pty " Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 11/14] qemu-char:udp " Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 12/14] Remove qemu_set_fd_handler2() Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 13/14] Remove now unused fd_read_poll and all its only left user Juan Quintela
2010-03-10 10:03 ` [Qemu-devel] [PATCH 14/14] Add qemu_remove_fd_handler() Juan Quintela

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=m3tyso1i7f.fsf@trasno.mitica \
    --to=quintela@redhat.com \
    --cc=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.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.