qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] do not send packet to nic if the packet will be


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH] do not send packet to nic if the packet will be dropped by nic
Date: Mon, 20 Jun 2011 14:13:32 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 20, 2011 at 11:52:20AM +0200, Kevin Wolf wrote:
> 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 <address@hidden>
> >>
> >> 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

Yes but the amount of wasted memory is bound from above
so this doesn't seem too bad to me ...

-- 
MST



reply via email to

[Prev in Thread] Current Thread [Next in Thread]