All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] do not send packet to nic if the packet will be dropped by nic
Date: Mon, 20 Jun 2011 11:52:20 +0200	[thread overview]
Message-ID: <4DFF1854.3070003@redhat.com> (raw)
In-Reply-To: <4DFF1596.8020902@cn.fujitsu.com>

Am 20.06.2011 11:40, schrieb Wen Congyang:
> At 06/20/2011 05:10 PM, Kevin Wolf Write:
>> Am 17.06.2011 03:33, schrieb Wen Congyang:
>>> If !s->clock_enabled or !rtl8139_receiver_enabled(s), it means that
>>> the nic will drop all packets from host. So qemu will keep getting
>>> packets from host and wasting CPU on dropping packets. This seems
>>> worse than packets that should be dropped but aren't.
>>>
>>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>>
>> Which bug does this change fix? I'm still not convinced that we should
>> do it.
> 
> Maybe not a bug fix now. As Michael S. Tsirkin said, if rtl8139_can_receive()
> returns 1, qemu will keep getting packets from host and wasting CPU on
> dropping packets. We can save CPU by return 0.

Don't we waste memory instead then because we leave the packets queued
indefinitely?

Kevin

  reply	other threads:[~2011-06-20  9:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  8:23 [Qemu-devel] [PATCH] fix the return value of rtl8139_can_receive() Wen Congyang
2011-06-16 10:39 ` Kevin Wolf
2011-06-16 12:46   ` Michael S. Tsirkin
2011-06-17  1:33     ` [Qemu-devel] [PATCH] do not send packet to nic if the packet will be dropped by nic Wen Congyang
2011-06-20  9:10       ` Kevin Wolf
2011-06-20  9:40         ` Wen Congyang
2011-06-20  9:52           ` Kevin Wolf [this message]
2011-06-20 11:13             ` Michael S. Tsirkin
2011-06-17  1:49   ` [Qemu-devel] [PATCH] fix the return value of rtl8139_can_receive() Wen Congyang

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=4DFF1854.3070003@redhat.com \
    --to=kwolf@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.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 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.