buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27147, sys_mbox_fetch processor hogging

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27147: sys_mbox_fetch processor hogging

Submitted by:  Joseph Thomas-Kerr <jokester01au>
Submitted on:  Fri 31 Jul 2009 02:15:06 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Mon 03 Aug 2009 09:48:49 AM UTC, comment #3:

... which makes this bug report invalid.

Simon Goldschmidt <goldsimon>
Project Administrator
Mon 03 Aug 2009 07:44:10 AM UTC, comment #2:

Good point :-[ Oops. I've moved the yield into my layer.

Joseph Thomas-Kerr <jokester01au>
Fri 31 Jul 2009 08:43:46 AM UTC, comment #1:

This function should spend most of its time in sys_arch_mbox_fetch(). If it's not, and is spinning in sys_mbox_fetch() then I think working out why would be a good idea. Perhaps there's a problem with sys_arch_mbox_fetch() on your system (that function is part of the port rather than core lwIP) that means it's returning early rather than waiting for the supplied timeout?

Kieran Mansley <kieranm>
Project Administrator
Fri 31 Jul 2009 02:15:06 AM UTC, original submission:

Hi,

I'm running this stack on a soft-processor on a Xilinx FPGA, and I've found that the sys_mbox_fetch loop tends to hog the processor. I added a yield just before the goto in this command (see attached diff from 1.3.1rc2) and this addresses the problem.

I looked in the system abstraction for a function to perform yield (eg sleep(0), but that doesn't seem to work that way here), but couldn't find one.

Obviously the posix call I've used isn't suitable for inclusion in the LWIP source, but perhaps an adapter function could be added and this yield put in place?

Regards,
Joe.

Joseph Thomas-Kerr <jokester01au>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by jokester01au (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Aug 2009 09:48:49 AM UTCgoldsimonStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 31 Jul 2009 02:15:07 AM UTCjokester01auAttached File-=>Added sys.c_yield.diff, #18502

    Back to the top


    Powered by Savane 3.1-cleanup1