Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / devfreq: Reorder fields in 'struct devfreq_dev_status'

Group some variables based on their sizes to reduce holes.
On x86_64, this shrinks the size of 'struct devfreq_dev_status' from 72 to
64 bytes.

This structure is used both to allocate static variables or is embedded in
some other structures. In both cases, reducing its size is nice to have.

Moreover, the whole structure now fits in a single cache line on x86_64.

Finally, it makes the order of code match the order of the above kernel
doc.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Christophe JAILLET and committed by
Chanwoo Choi
4a3a2c32 7877cb91

+2 -1
+2 -1
include/linux/devfreq.h
··· 108 108 unsigned long initial_freq; 109 109 unsigned int polling_ms; 110 110 enum devfreq_timer timer; 111 - bool is_cooling_device; 112 111 113 112 int (*target)(struct device *dev, unsigned long *freq, u32 flags); 114 113 int (*get_dev_status)(struct device *dev, ··· 117 118 118 119 unsigned long *freq_table; 119 120 unsigned int max_state; 121 + 122 + bool is_cooling_device; 120 123 }; 121 124 122 125 /**