'\" t .\" Title: check_asym_packing .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "CHECK_ASYM_PACKING" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" check_asym_packing \- Check to see if the group is packed into the sched doman\&. .SH "SYNOPSIS" .HP \w'int\ check_asym_packing('u .BI "int check_asym_packing(struct\ lb_env\ *\ " "env" ", struct\ sd_lb_stats\ *\ " "sds" ");" .SH "ARGUMENTS" .PP \fIenv\fR .RS 4 The load balancing environment\&. .RE .PP \fIsds\fR .RS 4 Statistics of the sched_domain which is to be packed .RE .SH "DESCRIPTION" .PP .PP This is primarily intended to used at the sibling level\&. Some cores like POWER7 prefer to use lower numbered SMT threads\&. In the case of POWER7, it can move to lower SMT modes only when higher threads are idle\&. When in lower SMT modes, the threads will perform better since they share less core resources\&. Hence when we have idle threads, we want them to be the higher ones\&. .PP This packing function is run on idle threads\&. It checks to see if the busiest CPU in this domain (core in the P7 case) has a higher CPU number than the packing function is being run on\&. Here we are assuming lower CPU number will be equivalent to lower a SMT thread number\&. .SH "RETURN" .PP 1 when packing is required and a task should be moved to this CPU\&. The amount of the imbalance is returned in *imbalance\&. .SH "COPYRIGHT" .br