1
0
Fork 0
alistair23-linux/drivers/infiniband/hw/qib
Sebastian Andrzej Siewior 3bd3706251 sched/core: Provide a pointer to the valid CPU mask
In commit:

  4b53a3412d ("sched/core: Remove the tsk_nr_cpus_allowed() wrapper")

the tsk_nr_cpus_allowed() wrapper was removed. There was not
much difference in !RT but in RT we used this to implement
migrate_disable(). Within a migrate_disable() section the CPU mask is
restricted to single CPU while the "normal" CPU mask remains untouched.

As an alternative implementation Ingo suggested to use:

	struct task_struct {
		const cpumask_t		*cpus_ptr;
		cpumask_t		cpus_mask;
        };
with
	t->cpus_ptr = &t->cpus_mask;

In -RT we then can switch the cpus_ptr to:

	t->cpus_ptr = &cpumask_of(task_cpu(p));

in a migration disabled region. The rules are simple:

 - Code that 'uses' ->cpus_allowed would use the pointer.
 - Code that 'modifies' ->cpus_allowed would use the direct mask.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190423142636.14347-1-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-06-03 11:49:37 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qib.h qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_6120_regs.h
qib_7220.h Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_7220_regs.h
qib_7322_regs.h IB/qib: Mask hardware error during link reset 2010-07-06 14:13:20 -07:00
qib_common.h infiniband/qib: Fix typo in comment 2019-04-22 14:08:15 -03:00
qib_debugfs.c infiniband: qib: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
qib_debugfs.h IB/qib: Convert opcode counters to per-context 2013-06-21 17:19:50 -07:00
qib_diag.c RDMA: Use u64_to_user_ptr everywhere 2018-03-29 13:42:29 -06:00
qib_driver.c qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_eeprom.c IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
qib_file_ops.c sched/core: Provide a pointer to the valid CPU mask 2019-06-03 11:49:37 +02:00
qib_fs.c qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_iba6120.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_iba7220.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_iba7322.c 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
qib_init.c qib: Convert qib_unit_table to XArray 2019-04-01 13:31:35 -03:00
qib_intr.c IB/qib: Convert timers to use timer_setup() 2017-10-09 12:19:41 -04:00
qib_mad.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c IB/qib: fix spelling mistake "colescing" -> "coalescing" 2018-11-26 16:45:06 -07:00
qib_pio_copy.c
qib_qp.c IB/{hfi1, qib, rdmavt}: Schedule multi RC/UC packets instead of posting 2018-09-11 09:55:02 -06:00
qib_qsfp.c IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_rc.c IB/{rdmavt, qib, hfi1}: Use new routine to release reference counts 2019-04-24 11:31:49 -03:00
qib_ruc.c IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt 2018-10-03 16:38:28 -06:00
qib_sd7220.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_sdma.c IB/{hfi1, qib, rvt} Cleanup open coded sge usage 2019-01-30 14:22:32 -05:00
qib_sysfs.c RDMA: Introduce and use rdma_device_to_ibdev() 2019-01-14 13:12:03 -07:00
qib_twsi.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_tx.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_uc.c IB/{hfi1, qib, rdmavt}: Move send completion logic to rdmavt 2018-10-03 16:38:28 -06:00
qib_ud.c Linux 5.0-rc5 2019-02-04 14:53:42 -07:00
qib_user_pages.c mm/gup: replace get_user_pages_longterm() with FOLL_LONGTERM 2019-05-14 09:47:45 -07:00
qib_user_sdma.c IB/qib: use the new FOLL_LONGTERM flag to get_user_pages_fast() 2019-05-14 09:47:46 -07:00
qib_user_sdma.h
qib_verbs.c IB/{hfi1,qib}: Cleanup open coded sge sizing 2019-01-30 14:22:32 -05:00
qib_verbs.h IB/rdmavt: Fix ab/ba include issues 2019-04-24 11:31:49 -03:00
qib_wc_ppc64.c
qib_wc_x86_64.c IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00