tech-kern archive

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

Re: lwp resource limit



On Jun 8,  4:47pm, matt%3am-software.com@localhost (Matt Thomas) wrote:
-- Subject: Re: lwp resource limit

| 
| On Jun 8, 2012, at 1:04 PM, Christos Zoulas wrote:
| 
| > In article 
<A4F96B90-D2E7-4F98-9B44-A040DED326F6%3am-software.com@localhost>,
| > Matt Thomas  <matt%3am-software.com@localhost> wrote:
| >> 
| >> On Jun 8, 2012, at 9:19 AM, Christos Zoulas wrote:
| >> 
| >>> On Jun 8,  9:00am, matt%3am-software.com@localhost (Matt Thomas) wrote:
| >>> -- Subject: Re: lwp resource limit
| >>> 
| >>> | 
| >>> | On Jun 8, 2012, at 5:24 AM, Christos Zoulas wrote:
| >>> | 
| >>> | >> +    if (l->l_flag & LW_RESCOUNT)
| >>> | >> 
| >>> | >> I don't see the need for this, why not check p_nlwp == 1?
| >>> | >> 
| >>> | >> if this is the first lwp for the proc p_nlwp should be 0 so check
| >>> | >> maxproc otherwise maxlwp.
| >>> | > 
| >>> | > You are forgetting compat_linux.
| >>> | 
| >>> | No I'm not.  I'm not using l_lid but the # of lwps in the proc.
| >>> 
| >>> I made the change, but now this begs the question to remove the enforce
| >>> argument because I don't like the assymmetry. Should I do that too? And
| >>> ignore kthreads in using a different criterion?
| >> 
| >> LW_SYSTEM/LW_INTR threads shouldn't be counted
| > 
| > New diff in http://www.netbsd.org/~christos/maxlwp.diff
| 
| Better.
| 
| Rather than have all the #ifdef __HAVE_CPU_MAXLWP how about doing
| 
| #ifndef __HAVE_CPU_MAXLWP
| static inline int
| cpu_maxlwp(void)
| {
|       return maxlwp;
| }
| #endif
| 
| in an appropriate header file?

Ok.

christos


Home | Main Index | Thread Index | Old Index