lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Slow response times in Microblaze Webserver example


From: jcr_alr
Subject: Re: [lwip-users] Slow response times in Microblaze Webserver example
Date: Mon, 23 Oct 2006 09:14:13 -0300
User-agent: Internet Messaging Program (IMP) 3.1

Hi Sathya,

Thanks for your message. I apologise for taking so long to reply but was away 
from an internet connection. I have been working with lwip set to PRIO and have 
succeeded in getting lwip to work in SCHED_PRIO mode, at least to a
certain extent. In sys_arch.c I added an array,
 
pthread_attr_t attr_prio[SYS_THREAD_MAX]. 

In sys_thread_new(void (* function)(void *arg), void *arg, int prio)

#if SCHED_TYPE == SCHED_PRIO
        attr_prio[i].schedparam.sched_priority = prio;
#endif

This allowed lwip_init_proper() to run. I commented out while (1);
at the end of the function to allow it to exit.

Now ping does work, although the response times are still quite poor, 5 - 6 ms.

Part of the delay, 1.6 ms, seems to be in tcpip_input() (tcpip.c) across the
call to memp_malloc(). This function sets a mutex which is released 
after the memory is obtained. I am still trying to understand the mutex code 
which seems to be sort of time-quantised (1 ms?).

Any help would be appreciated. If your new lwip and xilkernel is available, I
should really like to use it. I don't at this moment really want to switch to
8.2 as I have come to trust 8.1.02 quite well.

John Robbins


Quoting Sathya Thammanur <address@hidden>:

> The Priority scheduler working with lwIP had fixes done and should be
> available with EDK8.2.1i release.
> 
> Hope this helps
> 
> Sathya
> 
> On 10/18/06, address@hidden <address@hidden> wrote:
> >
> > I am making some progress with the slow ping response times. I realised
> > that
> > part of the problem was the use of SCHED_RR with a systmr_interval value
> > of 10.
> > With the two threads used in responding to the ping request, these delays
> > accounted for most of the observed value. Setting the systmr_interval
> > parameter
> > to 1 (the minimum?)reduced the ping times to 3 - 4 millisecs. I
> > instrumented
> > the emac and lwip libraries and from the observed timings it seems that
> > the
> > response time would be much better running under SCHED_PRIO.
> >
> > At the present under SCHED_PRIO, I cannot get past lwip_init() in
> > xemacif.c.
> > With gdb it looks as if the thread lwip_init_proper is never created so
> > that
> > the variable lwp_init_proper_done is never set. It seems that something
> > strange
> > is happening in the previous block where there semaphores, messageboxes
> > etc are
> > setup, which probably means that I have missed setting up the
> > xilkernel/lwip
> > parameters properly for use under SCHED_PRIO.
> >
> > Any input again would be most welcome.
> >
> > John Robbins
> >
> >
> >
> >
> 





reply via email to

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