1 |
On Wed, Jun 3, 2015 at 4:22 PM, Christian Bricart <christian@×××××××.de> wrote: |
2 |
> Dear devs, |
3 |
> |
4 |
> i've just hit the constraint CHECKREQS_MEMORY=3G in |
5 |
>>=www-client/chromium-44.* on a 2 GiB RAM machine.. (having additionally |
6 |
> 5G Swap on SSD..) |
7 |
> |
8 |
> I personally doubt that check-reqs_memory() in the eclass should only |
9 |
> check for *physical* rather than *virtual* RAM to fulfill this |
10 |
> constraint and fail if unsatisfied. |
11 |
> |
12 |
> So my proposal would rather be: |
13 |
> |
14 |
> * $CHECKREQS_MEMORY<=pysical RAM -> ok |
15 |
> * $CHECKREQS_MEMORY>pysical RAM && <= virtual RAM -> ewarn |
16 |
> * $CHECKREQS_MEMORY>virtual RAM -> eerror (may still be overridden by |
17 |
> ${I_KNOW_WHAT_I_AM_DOING} in check-reqs_output() ) |
18 |
> |
19 |
> what do you think? |
20 |
> |
21 |
|
22 |
The chromium build issue is a point of some contention; see the bug below. |
23 |
|
24 |
https://bugs.gentoo.org/show_bug.cgi?id=471810 |
25 |
|
26 |
I agree that it makes sense to check virtual memory. I guess that |
27 |
would be MemTotal + SwapTotal in /proc/meminfo. |
28 |
|
29 |
It would also probably make more sense to check available memory |
30 |
(MemAvailable + SwapFree). Maybe that should be implemented in a new |
31 |
function, like check-reqs_memory_available. |
32 |
|
33 |
I don't like your weird ewarn/eerror proposal. We should either fail, |
34 |
or not fail in check-reqs_pkg_pretend and check-reqs_pkg_setup. And |
35 |
the helper functions should continue to return a non-zero status on |
36 |
failure. |