Code review request for following two bugs :
   10115 - AI ignores desired swap listed in ai manifest
   http://defect.opensolaris.org/bz/show_bug.cgi?id=10115

   12960 - Should be possible to define dump ZVOL size in AI manifest
   http://defect.opensolaris.org/bz/show_bug.cgi?id=12960

Webrev :
   http://cr.opensolaris.org/~mattman/bug-10115-12960/

Both bugs were addressed together as they affect same code paths.

10115
-----
AI manifest currently provides specification for <ai_swap_size>, however the 
contents of this element had never been implemented, it was simply ignored.
Solution, was to read <ai_swap_size> from manifest, if defined and pass through 
to liborchestrator via nvlist as new nvpair.

12960
-----
This is a request to allow the specification of dump size in AI manifest.
Solution, was to define new section in AI manifest <ai_device_dump> which can
contain new element <ai_dump_size>. Parse this element in AI and pass through 
to 
liborchestrator in the same manner as swap size.

In both cases for swap and dump size, a specification of "0" size is indicative 
that the user does not want a swap/dump zvol created.

The only instance where this is ignored is in the case of swap where a system 
memory is low e.g. < 700MB, then a default swap slice of 512 is created (see 
disk_slices.c)

Swap and dump sizes are always optional, if neither are specified, then the 
original algorithm for calculating swap and dump size is used, which is
simply RAM/2.

If specified swap size takes precedence over dump size.


Following testing was carried out.

Machine : X86 Vbox Client
Disk Size : 16GB (16001 MB)
Ram Size  :  1GB (1024 MB)
Recommended Software Size : ((4096 * 1.2) * 2) + 2048 = 11878 MB
Available disk space for swap/dump : (16001 MB - 11878 MB) = 4123 MB

Following scenarios were tested :

<ai_swap_size>  <ai_dump_size>    Swap Created    Dump Created
--------------- ---------------- --------------- ------------
Not Specified   Not Specified    512             511
0               Not Specified    Not Created     511
250             Not Specified    512             511
1024            Not Specified    1024            511
5000            Not Specified    3867            256
Not Specified   0                512             Not Created
Not Specified   250              512             256
Not Specified   1024             512             1024
Not Specified   5000             512             3611
0               0                Not Created     Not Created
250             0                512             Not Created
1500            0                1500            Not Created
5000            0                4123            Not Created
0               250              Not Created     256
0               1500             Not Created     1500
0               5000             Not Created     4123
1024            1024             1024            1024
3000            3000             3000            1123
5000            5000             3867            256
1024            4000             1024            3099
1024            5000             1024            3099
4000            1024             3867            256
5000            1024             3867            256

Reply via email to