4 1. Configure "Class based physical memory controller" under CKRM (see
5 Documentation/ckrm/installation)
7 2. Reboot the system with the new kernel.
9 3. Verify that the memory controller is present by reading the file
10 /rcfs/taskclass/config (should show a line with res=mem)
15 For brevity, unless otherwise specified all the following commands are
16 executed in the default class (/rcfs/taskclass).
18 Initially, the systemwide default class gets 100% of the LRU pages, and the
19 config file displays the total number of physical pages.
23 res=mem;tot_pages=239778,active=60473,inactive=135285,free=44555
25 res=mem,guarantee=-2,limit=-2,total_guarantee=100,max_limit=100
27 tot_pages - total number of pages
28 active - number of pages in the active list ( sum of all zones)
29 inactive - number of pages in the inactive list ( sum of all zones )
30 free - number of free pages (sum of all pages)
32 By making total_guarantee and max_limit to be same as tot_pages, one make
33 make the numbers in shares file be same as the number of pages for a
36 # echo 'res=mem,total_guarantee=239778,max_limit=239778' > shares
38 res=mem,guarantee=-2,limit=-2,total_guarantee=239778,max_limit=239778
46 Its initial share is don't care. The parent's share values will be unchanged.
48 Setting a new class share
49 -------------------------
51 # echo 'res=mem,guarantee=25000,limit=50000' > c1/shares
54 res=mem,guarantee=25000,limit=50000,total_guarantee=100,max_limit=100
56 'guarantee' specifies the number of pages this class entitled to get
57 'limit' is the maximum number of pages this class can get.
62 stats file shows statistics of the page usage of a class
64 ----------- Memory Resource stats start -----------
65 Number of pages used(including pages lent to children): 196654
66 Number of pages guaranteed: 239778
67 Maximum limit of pages: 239778
68 Total number of pages available(after serving guarantees to children): 214778
69 Number of pages lent to children: 0
70 Number of pages borrowed from the parent: 0
71 ----------- Memory Resource stats end -----------