Alexey Dobriyan
9b130ad5bb
treewide: make "nr_cpu_ids" unsigned
...
First, number of CPUs can't be negative number.
Second, different signnnedness leads to suboptimal code in the following
cases:
1)
kmalloc(nr_cpu_ids * sizeof(X));
"int" has to be sign extended to size_t.
2)
while (loff_t *pos < nr_cpu_ids)
MOVSXD is 1 byte longed than the same MOV.
Other cases exist as well. Basically compiler is told that nr_cpu_ids
can't be negative which can't be deduced if it is "int".
Code savings on allyesconfig kernel: -3KB
add/remove: 0/0 grow/shrink: 25/264 up/down: 261/-3631 (-3370)
function old new delta
coretemp_cpu_online 450 512 +62
rcu_init_one 1234 1272 +38
pci_device_probe 374 399 +25
...
pgdat_reclaimable_pages 628 556 -72
select_fallback_rq 446 369 -77
task_numa_find_cpu 1923 1807 -116
Link: http://lkml.kernel.org/r/20170819114959.GA30580@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2017-09-08 18:26:48 -07:00
..
2017-09-05 12:45:03 -07:00
2017-09-08 18:26:48 -07:00
2017-09-07 09:25:15 -07:00
2017-05-15 16:08:56 +02:00
2017-08-10 16:28:53 +02:00
2017-08-10 17:35:19 +02:00
2017-06-28 06:54:46 -07:00
2016-11-16 20:46:38 +01:00
2016-12-25 14:30:04 -08:00
2017-01-28 22:55:22 +01:00
2017-03-16 09:06:35 +01:00
2017-08-24 09:57:28 +02:00
2017-08-31 21:35:10 +02:00
2017-02-07 10:42:10 +01:00
2016-12-12 19:25:04 -08:00
2016-12-24 11:46:01 -08:00
2017-07-12 16:25:59 -07:00
2017-07-21 10:14:15 +02:00
2017-03-02 08:42:34 +01:00
2017-07-18 10:56:23 +02:00
2017-07-18 10:56:23 +02:00
2017-07-30 12:04:41 +02:00
2017-07-18 11:38:01 +02:00
2017-03-21 12:30:16 +01:00
2017-09-05 12:45:03 -07:00
2016-07-22 11:46:01 +02:00
2017-08-31 21:34:48 +02:00
2017-07-18 11:38:00 +02:00
2017-04-21 09:48:16 +02:00
2017-03-24 10:14:08 +01:00
2017-05-26 22:37:02 -04:00
2017-08-29 12:07:26 +02:00
2017-09-04 17:43:56 -07:00
2017-08-31 15:47:02 +02:00
2017-07-18 11:38:00 +02:00
2017-08-01 13:02:37 +02:00
2016-07-14 15:06:41 +02:00
2016-07-14 15:06:41 +02:00
2017-04-14 12:08:51 +02:00
2017-09-01 11:04:56 +02:00
2016-07-14 15:06:41 +02:00
2017-03-04 11:36:19 -08:00
2016-07-14 15:06:41 +02:00
2017-03-02 08:42:36 +01:00
2017-08-29 11:42:30 +02:00
2017-08-29 11:42:29 +02:00
2017-08-29 12:07:28 +02:00
2017-01-19 08:42:37 +01:00
2017-05-26 10:10:45 +02:00
2017-07-18 11:37:58 +02:00
2017-07-05 10:09:02 +02:00
2016-08-24 12:27:41 +02:00
2017-08-26 09:19:13 +02:00
2017-08-29 12:07:29 +02:00
2017-03-02 08:42:27 +01:00
2017-07-27 09:12:57 +02:00
2016-08-18 23:41:55 +02:00
2017-08-29 12:07:26 +02:00
2017-07-30 12:09:12 +02:00
2017-08-29 12:07:25 +02:00
2017-07-26 13:18:20 +02:00
2017-07-18 11:38:02 +02:00
2016-12-25 10:47:41 +01:00
2017-06-20 12:52:43 +02:00
2017-08-16 20:40:09 +02:00
2016-12-22 17:43:35 +01:00
2016-12-22 17:43:35 +01:00
2017-02-22 18:22:53 -08:00
2017-08-31 21:35:10 +02:00
2017-06-28 06:54:46 -07:00
2017-07-18 11:38:03 +02:00
2016-04-16 13:21:40 +02:00
2017-07-18 11:38:03 +02:00
2017-07-18 11:38:03 +02:00
2017-03-02 08:42:36 +01:00
2017-08-24 09:57:28 +02:00
2016-07-14 15:06:41 +02:00
2017-01-28 09:31:13 +01:00
2017-09-04 13:56:37 -07:00
2017-09-04 13:56:37 -07:00
2017-07-18 11:38:04 +02:00
2017-03-20 16:10:32 +01:00
2017-03-02 08:42:30 +01:00
2017-08-03 23:26:22 +02:00
2017-08-29 12:07:26 +02:00
2017-07-30 12:09:12 +02:00
2017-01-28 09:33:16 +01:00
2016-11-29 18:02:58 +01:00
2017-09-08 18:26:48 -07:00
2017-09-05 12:45:03 -07:00
2017-04-05 10:16:43 +02:00
2017-07-30 12:04:41 +02:00
2017-08-29 11:42:29 +02:00
2017-09-08 18:26:48 -07:00
2017-03-08 09:18:02 +01:00
2017-07-30 12:04:41 +02:00
2017-07-21 10:05:18 +02:00
2016-05-07 07:00:07 +02:00
2016-11-16 09:38:23 +01:00
2017-06-15 16:41:10 +02:00
2017-06-13 08:42:09 +02:00
2017-08-29 12:07:25 +02:00
2017-08-29 11:42:29 +02:00
2017-08-29 12:07:27 +02:00
2016-11-18 10:58:31 +01:00
2017-06-04 21:55:53 +02:00
2017-07-03 18:01:50 -07:00
2017-09-04 09:52:57 -07:00
2017-07-26 13:18:20 +02:00
2017-07-26 13:18:20 +02:00
2016-08-12 08:29:24 +02:00
2017-04-26 10:02:06 +02:00
2017-07-26 13:18:20 +02:00
2017-01-28 14:42:26 +01:00