Files
android_kernel_xiaomi_sm8450/include/linux
Mike Travis 41df0d61c2 x86: Add performance variants of cpumask operators
* Increase performance for systems with large count NR_CPUS by limiting
    the range of the cpumask operators that loop over the bits in a cpumask_t
    variable.  This removes a large amount of wasted cpu cycles.

  * Add performance variants of the cpumask operators:

    int cpus_weight_nr(mask)	     Same using nr_cpu_ids instead of NR_CPUS
    int first_cpu_nr(mask)	     Number lowest set bit, or nr_cpu_ids
    int next_cpu_nr(cpu, mask)	     Next cpu past 'cpu', or nr_cpu_ids
    for_each_cpu_mask_nr(cpu, mask)  for-loop cpu over mask using nr_cpu_ids

  * Modify following to use performance variants:

    #define num_online_cpus()	cpus_weight_nr(cpu_online_map)
    #define num_possible_cpus()	cpus_weight_nr(cpu_possible_map)
    #define num_present_cpus()	cpus_weight_nr(cpu_present_map)

    #define for_each_possible_cpu(cpu) for_each_cpu_mask_nr((cpu), ...)
    #define for_each_online_cpu(cpu)   for_each_cpu_mask_nr((cpu), ...)
    #define for_each_present_cpu(cpu)  for_each_cpu_mask_nr((cpu), ...)

  * Comment added to include/linux/cpumask.h:

    Note: The alternate operations with the suffix "_nr" are used
	  to limit the range of the loop to nr_cpu_ids instead of
	  NR_CPUS when NR_CPUS > 64 for performance reasons.
	  If NR_CPUS is <= 64 then most assembler bitmask
	  operators execute faster with a constant range, so
	  the operator will continue to use NR_CPUS.

	  Another consideration is that nr_cpu_ids is initialized
	  to NR_CPUS and isn't lowered until the possible cpus are
	  discovered (including any disabled cpus).  So early uses
	  will span the entire range of NR_CPUS.

    (The net effect is that for systems with 64 or less CPU's there are no
     functional changes.)

For inclusion into sched-devel/latest tree.

Based on:
	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git

Cc: Paul Jackson <pj@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Paul Jackson <pj@sgi.com>
Reviewed-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-05-23 18:23:38 +02:00
..
2008-01-28 14:54:13 -08:00
2007-12-26 19:36:35 -08:00
2008-02-05 03:20:13 -08:00
2008-05-20 14:14:15 -07:00
2008-02-06 10:41:02 -08:00
2008-04-29 08:06:00 -07:00
2008-01-28 15:00:14 -08:00
2008-03-04 13:41:23 +01:00
2008-04-28 06:28:37 -04:00
2007-10-18 14:37:29 -07:00
2008-04-29 08:11:16 -07:00
2008-04-29 12:36:54 -07:00
2008-01-29 21:55:15 +01:00
2008-04-22 15:16:32 -05:00
2008-04-29 08:06:01 -07:00
2008-01-28 14:54:10 -08:00
2007-10-19 11:53:36 -07:00
2008-02-03 17:45:46 +02:00
2008-05-01 08:03:59 -07:00
2008-01-28 23:21:18 +01:00
2007-12-06 17:40:19 -05:00
2008-04-30 08:29:52 -07:00
2007-10-17 08:42:52 -07:00
2007-07-17 10:23:04 -07:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-03-04 14:47:06 -08:00
2007-10-19 11:53:36 -07:00
2008-04-21 11:22:28 -05:00
2008-04-25 13:26:55 +01:00
2008-04-25 13:26:55 +01:00
2008-02-08 02:09:56 +00:00
2008-04-25 13:26:55 +01:00
2008-04-21 22:38:45 +00:00
2008-02-08 09:22:24 -08:00
2008-04-28 08:58:30 -07:00
2008-04-19 19:19:54 +02:00
2008-02-07 08:42:30 -08:00
2008-01-28 23:21:18 +01:00
2007-10-29 07:41:32 -07:00
2008-05-07 09:48:23 +02:00
2007-10-17 08:43:02 -07:00
2007-10-17 08:42:48 -07:00
2008-04-28 08:58:35 -07:00
2007-10-17 08:43:01 -07:00
2008-05-16 17:22:26 -04:00
2008-05-01 13:08:16 -04:00
2008-05-07 09:29:00 +02:00
2008-05-13 08:02:26 -07:00
2007-07-10 00:35:17 -04:00
2008-05-20 16:44:43 +02:00
2008-05-20 16:44:43 +02:00
2008-04-22 11:34:59 +02:00
2008-02-05 09:44:19 -08:00
2008-04-04 18:36:49 +02:00
2008-04-29 23:11:38 +02:00
2008-05-18 20:49:41 +02:00
2007-10-22 00:56:52 -04:00
2008-05-14 23:06:16 +02:00
2008-04-29 08:06:25 -07:00
2007-10-10 16:51:59 -07:00
2007-10-17 08:42:52 -07:00
2008-01-28 15:07:58 -08:00
2008-01-28 14:55:09 -08:00
2008-03-17 22:48:46 -07:00
2007-12-05 05:37:32 -08:00
2008-04-29 08:06:03 -07:00
2008-04-29 08:06:02 -07:00
2008-05-05 16:47:14 +10:00
2008-04-29 08:06:15 -07:00
2008-04-19 19:10:28 -07:00
2007-07-11 15:03:53 +01:00
2008-05-01 08:03:58 -07:00
2007-10-17 08:42:52 -07:00
2007-11-29 09:24:52 -08:00
2008-05-14 19:11:14 -07:00
2007-07-18 08:47:40 -07:00
2008-04-19 19:44:57 +02:00
2008-01-25 21:08:34 +01:00
2007-10-25 15:02:50 +10:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2008-02-03 17:45:46 +02:00
2008-02-06 10:41:01 -08:00
2007-07-16 09:05:34 -07:00
2007-07-18 08:47:45 -07:00
2008-02-26 14:03:47 +09:00
2008-05-01 08:03:58 -07:00
2008-04-29 08:06:01 -07:00
2007-10-10 16:54:03 -07:00
2008-04-29 08:06:17 -07:00
2008-02-08 09:22:31 -08:00
2008-02-14 21:13:33 -08:00
2008-04-28 08:58:29 -07:00
2008-04-19 16:54:56 -04:00
2008-04-19 16:55:29 -04:00
2007-10-17 08:42:58 -07:00
2007-10-16 09:43:02 -07:00
2008-02-14 21:13:33 -08:00
2008-04-20 21:47:03 -07:00
2008-04-20 21:47:03 -07:00
2007-10-17 08:42:44 -07:00
2008-04-29 08:06:02 -07:00
2008-02-07 23:11:56 -08:00
2008-04-29 08:06:02 -07:00
2008-05-06 12:01:41 -04:00
2008-03-17 22:46:46 -07:00
2008-02-08 09:22:31 -08:00
2007-10-19 11:53:41 -07:00
2008-02-05 09:44:22 -08:00
2008-01-30 13:31:47 +01:00
2008-04-30 08:29:51 -07:00
2008-04-29 08:05:59 -07:00
2007-07-21 18:37:10 -07:00
2008-01-31 19:26:46 -08:00
2007-11-29 09:24:54 -08:00
2007-07-16 09:05:50 -07:00
2007-10-16 09:43:17 -07:00
2007-10-19 11:53:44 -07:00
2008-04-17 10:43:01 -04:00
2008-04-25 00:25:08 +02:00
2008-02-07 08:42:34 -08:00
2008-04-28 08:58:32 -07:00
2008-04-15 13:26:52 -04:00
2008-02-07 08:42:30 -08:00
2008-01-25 21:08:33 +01:00
2008-01-31 19:28:30 -08:00
2008-01-24 00:47:27 -05:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-01-25 21:08:34 +01:00
2008-02-07 08:42:34 -08:00
2008-04-28 08:58:20 -07:00
2008-04-28 08:58:29 -07:00
2008-04-19 19:44:59 +02:00
2008-05-04 17:07:03 -07:00
2008-05-21 17:40:05 -07:00
2008-04-29 02:48:01 -04:00
2008-02-01 17:45:14 +01:00
2008-05-01 08:03:59 -07:00
2008-04-30 08:29:47 -07:00
2008-04-17 20:05:36 +02:00
2008-01-24 20:40:26 -08:00
2008-04-24 21:16:57 -07:00
2007-09-19 11:24:18 -07:00
2008-05-09 07:45:18 -07:00
2007-12-26 19:36:35 -08:00
2007-10-23 13:47:31 -05:00
2008-02-04 23:50:13 +11:00
2007-10-23 15:49:55 +10:00
2008-04-28 08:58:21 -07:00
2008-02-06 10:41:03 -08:00
2007-10-19 11:53:34 -07:00