Skip to content

Commit 4a3a2c3

Browse files
tititiou36chanwoochoi
authored andcommitted
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 <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 7877cb9 commit 4a3a2c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/devfreq.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ struct devfreq_dev_profile {
108108
unsigned long initial_freq;
109109
unsigned int polling_ms;
110110
enum devfreq_timer timer;
111-
bool is_cooling_device;
112111

113112
int (*target)(struct device *dev, unsigned long *freq, u32 flags);
114113
int (*get_dev_status)(struct device *dev,
@@ -118,6 +117,8 @@ struct devfreq_dev_profile {
118117

119118
unsigned long *freq_table;
120119
unsigned int max_state;
120+
121+
bool is_cooling_device;
121122
};
122123

123124
/**

0 commit comments

Comments
 (0)