Hi,

I want to enforce migration of thread+allocated memory to another lgroup but 
failed for some threads.

I understand from the "Memory and Thread Placement Optimization Developer's 
Guide", that there is no hard memory affinity in Solaris, but only the 
possibility to define some level of affinity to the home lgroup. Therefore, 
prior to any kind of memory migration it seems necessary to move the home 
lgroup to the lgroup where the memory should migrate to. The lgrp_home(3LGRP) 
man page defines the  "home lgroup" of a  thread as the "lgroup  with  the 
strongest  affinity  that  the thread can run on". 

A sequence for memory migration was already lined out in 
http://www.opensolaris.org/jive/thread.jspa?messageID=14792:

- Change the thread in questions home lgroup to the CPU where you want the 
memory allocated,
- use 'pmadvise -o heap=lwp_access' on the process
- the memory should now get allocated in the newly homed lgrp (check with 'pmap 
-L' and lgrpinfo (if the allocation is large enough to notice)).
- rehome the lgrp to another CPU or just bind it.

I tried, but for some threads, I got surprising results:

> ./plgrp -a all 27215
     PID/LWPID    HOME  AFFINITY
   27215/1        2     5/strong,0-4,6-24/none

If the home lgroup is defined as the lgroup with the strongest affinity, isn't 
the output above somewhat contradictory?

> ./plgrp -F -H 5 27215
     PID/LWPID    HOME
   27215/1        2 => 2

This thread seems to be resistant to plgrp's attempts to assign a new home 
lgroup (option -H) to it.

This is a test program. For some other threads, I was able to freely rehome 
them to any lgroup in the range 1..8 (the leaf lgroups). Has anyone some 
further suggestions on what could prevent reassigning the home lgroup?

My system is a Sun Fire X4600 with eight dual-core Opterons. Lgroups 1..8 are 
identical (i.e. same amount of memory and CPU resources per lgroup), except for 
the CPU IDs:
> lgrpinfo.pl -a
[..]
lgroup 1 (leaf):
        Children: none, Parent: 9
        CPUs: 0 1
        Memory: installed 3584 Mb, allocated 985 Mb, free 2599 Mb
        Lgroup resources: 1 (CPU); 1 (memory)
        Load: 0.00723
        Latency: 51
[..]

> psrinfo
0       on-line   since 11/12/2008 13:38:11
1       on-line   since 11/12/2008 13:38:15
2       on-line   since 11/12/2008 13:38:17
3       on-line   since 11/12/2008 13:38:19
4       on-line   since 11/12/2008 13:38:21
5       on-line   since 11/12/2008 13:38:23
6       on-line   since 11/12/2008 13:38:25
7       on-line   since 11/12/2008 13:38:27
8       on-line   since 11/12/2008 13:38:29
9       on-line   since 11/12/2008 13:38:31
10      on-line   since 11/12/2008 13:38:33
11      on-line   since 11/12/2008 13:38:35
12      on-line   since 11/12/2008 13:38:37
13      on-line   since 11/12/2008 13:38:39
14      on-line   since 11/12/2008 13:38:41
15      on-line   since 11/12/2008 13:38:43


Thanks, Manfred
-- 
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to