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: Machine very sluggish while compiling


On Dec  5 17:25, Ken Brown wrote:
> On 12/4/2011 5:06 AM, Corinna Vinschen wrote:
> >Anyway, stoppping the PCA service and setting its start mode to "Manual"
> >does the trick for me.
> 
> It does the trick for me too.  For a long time I've been unable to
> build emacs using cygport's default for parallel make (-j5 because I
> have 4 cores).  When I did this, I would either have the computer
> freeze (and I would have to shut it down with the power button) or
> else I would get a BSOD.
> 
> Since stopping PCA, the problem seems to be gone.

In the meantime I found another way how to avoid this problem.

Here's an excerpt from the MSDN man page of AssignProcessToJobObject:

  If the process is being monitored by the Program Compatibility
  Assistant (PCA), it is placed into a compatibility job. Therefore, the
  process must be created using CREATE_BREAKAWAY_FROM_JOB before it can
  be placed in another job. Alternatively, you can embed an application
  manifest that specifies a User Account Control (UAC) level in your
  application and PCA will not add the process to the compatibility job.

So, what I did was to change Cygwin locally to add the
CREATE_BREAKAWAY_FROM_JOB flag to the CreateProcess call when execing a
process.  With this change, I had no problems with PCA anymore.

I also tried to use an "asInvoker" side-by-side manifest for mintty, but
I had no luck with it.  PCA still wasted memory and CPU.

So I'm wondering if we should simply add the CREATE_BREAKAWAY_FROM_JOB
flag to our CreateProcess calls and be done with it.  As far as I can
see, and from what MSDN claims, there should be no problem doing that.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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


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