This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Excessive thrashing when popen()ing after a large malloc()


On Tue Nov 14 15:53:36 2006, Eric Blake (ebb9@byu.net ) wrote:
> According to Loic Grenie on 11/14/2006 4:12 AM:
>>    The subjects says it all: when a process has a large memory space,
>>   a popen() triggers a long disk thrashing. The result can clearly be
>>   seen iwth the allegated cygtharsh program (running with 1GB of memory,
>>   change the size of the malloc to roughly half your memory size):

> Indeed - the fork/exec model of the current popen implementation is harsh
> on large memory spaces, compared to your proposed spawn model.  While the
> idea may have merit, you have some work to do before a patch can be accepted.

    I did actually not submit a patch, I suggested a modification with some
  basic, untested, lines of code as a start.

>>   to something similar to (warning: untested, needs a char *cmd; at the
>>   beggining):

> Hint - popen is implemented in newlib, not cygwin, so you are posting to
> the wrong list.  Unless you provide a 'diff -u' patch, it is very
> difficult to see your changes in context.

    Sorry, I'll try to write there, with an additional diff -u.

> And admitting that your changes are untested is not a good sign for
> getting it approved.

    I'm not really "admitting", I am just expliciting that the patch is
  untested. I do not have the resources to build the thing.

      Sorry to have disturbed, happy cygwining,

         Loïc

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]