Hello, Am Samstag, 28. November 2015 schrieb John Johansen: > v2 > switch to default --jobs=auto > check and bail on bad debug argument > update comments on work_sync_one() > check for an invalid number of maximum jobs() > put an upper limit on the maximum number of jobs to 8*# of cpus
> +static void setup_parallel_compile(void) > +{ > + /* jobs_count and paralell_max set by default, config or args */ > + long n = sysconf(_SC_NPROCESSORS_ONLN); > + if (jobs_count == JOBS_AUTO) > + jobs_count = n; > + if (jobs_max == JOBS_AUTO) > + jobs_max = n; > + /* jobs_max will be used internally */ > + jobs_max = min(jobs_count, jobs_max); > + if (jobs_max > 8*n) { > + PERROR("%s: Invalid maximum number of jobs '%ld' > 8 * # of > cpus", > + progname, jobs_max); > + exit(1); > + } So the parser will error out if a too big job number is given _and_ if there are enough profiles to load (otherwise the number gets reduced to the number of available profiles/jobs). In other words: I can use -j 10000 for quite a while, but it will break after I add another profile to my system. This sounds like surprising behaviour to me (especially because it depends on the number of profiles to load), and I'm not sure if it's critical enough to exit(). I'd prefer to reduce jobs_max to 8*n and print a warning. In C-like Pseudocode: + if (jobs_max > 8*n) { + WARN("%s: Invalid maximum number of jobs '%ld' > 8 * # of cpus, reducing to %ld", + progname, jobs_max, n); + jobs_max = 8*n; + } Regards, Christian Boltz -- Who is General Failure and why is he reading my disk? -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor