Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - another round of rq-clock handling debugging, robustization and fixes - PELT accounting improvements - CPU hotplug related ->cpus_allowed affinity handling fixes all around the tree - ... plus misc fixes, cleanups and updates" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) sched/x86: Update reschedule warning text crypto: N2 - Replace racy task affinity logic cpufreq/sparc-us2e: Replace racy task affinity logic cpufreq/sparc-us3: Replace racy task affinity logic cpufreq/sh: Replace racy task affinity logic cpufreq/ia64: Replace racy task affinity logic ACPI/processor: Replace racy task affinity logic ACPI/processor: Fix error handling in __acpi_processor_start() sparc/sysfs: Replace racy task affinity logic powerpc/smp: Replace open coded task affinity logic ia64/sn/hwperf: Replace racy task affinity logic ia64/salinfo: Replace racy task affinity logic workqueue: Provide work_on_cpu_safe() ia64/topology: Remove cpus_allowed manipulation sched/fair: Move the PELT constants into a generated header sched/fair: Increase PELT accuracy for small tasks sched/fair: Fix comments sched/Documentation: Add 'sched-pelt' tool sched/fair: Fix corner case in __accumulate_sum() sched/core: Remove 'task' parameter and rename tsk_restore_flags() to current_restore_flags() ...
Šī revīzija ir iekļauta:
@@ -179,14 +179,14 @@ struct salinfo_platform_oemdata_parms {
|
||||
const u8 *efi_guid;
|
||||
u8 **oemdata;
|
||||
u64 *oemdata_size;
|
||||
int ret;
|
||||
};
|
||||
|
||||
static void
|
||||
static long
|
||||
salinfo_platform_oemdata_cpu(void *context)
|
||||
{
|
||||
struct salinfo_platform_oemdata_parms *parms = context;
|
||||
parms->ret = salinfo_platform_oemdata(parms->efi_guid, parms->oemdata, parms->oemdata_size);
|
||||
|
||||
return salinfo_platform_oemdata(parms->efi_guid, parms->oemdata, parms->oemdata_size);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -380,16 +380,7 @@ salinfo_log_release(struct inode *inode, struct file *file)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
call_on_cpu(int cpu, void (*fn)(void *), void *arg)
|
||||
{
|
||||
cpumask_t save_cpus_allowed = current->cpus_allowed;
|
||||
set_cpus_allowed_ptr(current, cpumask_of(cpu));
|
||||
(*fn)(arg);
|
||||
set_cpus_allowed_ptr(current, &save_cpus_allowed);
|
||||
}
|
||||
|
||||
static void
|
||||
static long
|
||||
salinfo_log_read_cpu(void *context)
|
||||
{
|
||||
struct salinfo_data *data = context;
|
||||
@@ -399,6 +390,7 @@ salinfo_log_read_cpu(void *context)
|
||||
/* Clear corrected errors as they are read from SAL */
|
||||
if (rh->severity == sal_log_severity_corrected)
|
||||
ia64_sal_clear_state_info(data->type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -430,7 +422,7 @@ retry:
|
||||
spin_unlock_irqrestore(&data_saved_lock, flags);
|
||||
|
||||
if (!data->saved_num)
|
||||
call_on_cpu(cpu, salinfo_log_read_cpu, data);
|
||||
work_on_cpu_safe(cpu, salinfo_log_read_cpu, data);
|
||||
if (!data->log_size) {
|
||||
data->state = STATE_NO_DATA;
|
||||
cpumask_clear_cpu(cpu, &data->cpu_event);
|
||||
@@ -459,11 +451,13 @@ salinfo_log_read(struct file *file, char __user *buffer, size_t count, loff_t *p
|
||||
return simple_read_from_buffer(buffer, count, ppos, buf, bufsize);
|
||||
}
|
||||
|
||||
static void
|
||||
static long
|
||||
salinfo_log_clear_cpu(void *context)
|
||||
{
|
||||
struct salinfo_data *data = context;
|
||||
|
||||
ia64_sal_clear_state_info(data->type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -486,7 +480,7 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
|
||||
rh = (sal_log_record_header_t *)(data->log_buffer);
|
||||
/* Corrected errors have already been cleared from SAL */
|
||||
if (rh->severity != sal_log_severity_corrected)
|
||||
call_on_cpu(cpu, salinfo_log_clear_cpu, data);
|
||||
work_on_cpu_safe(cpu, salinfo_log_clear_cpu, data);
|
||||
/* clearing a record may make a new record visible */
|
||||
salinfo_log_new_read(cpu, data);
|
||||
if (data->state == STATE_LOG_RECORD) {
|
||||
@@ -531,9 +525,8 @@ salinfo_log_write(struct file *file, const char __user *buffer, size_t count, lo
|
||||
.oemdata = &data->oemdata,
|
||||
.oemdata_size = &data->oemdata_size
|
||||
};
|
||||
call_on_cpu(cpu, salinfo_platform_oemdata_cpu, &parms);
|
||||
if (parms.ret)
|
||||
count = parms.ret;
|
||||
count = work_on_cpu_safe(cpu, salinfo_platform_oemdata_cpu,
|
||||
&parms);
|
||||
} else
|
||||
data->oemdata_size = 0;
|
||||
} else
|
||||
|
@@ -355,18 +355,12 @@ static int cache_add_dev(unsigned int cpu)
|
||||
unsigned long i, j;
|
||||
struct cache_info *this_object;
|
||||
int retval = 0;
|
||||
cpumask_t oldmask;
|
||||
|
||||
if (all_cpu_cache_info[cpu].kobj.parent)
|
||||
return 0;
|
||||
|
||||
oldmask = current->cpus_allowed;
|
||||
retval = set_cpus_allowed_ptr(current, cpumask_of(cpu));
|
||||
if (unlikely(retval))
|
||||
return retval;
|
||||
|
||||
retval = cpu_cache_sysfs_init(cpu);
|
||||
set_cpus_allowed_ptr(current, &oldmask);
|
||||
if (unlikely(retval < 0))
|
||||
return retval;
|
||||
|
||||
|
@@ -598,12 +598,17 @@ static void sn_hwperf_call_sal(void *info)
|
||||
op_info->ret = r;
|
||||
}
|
||||
|
||||
static long sn_hwperf_call_sal_work(void *info)
|
||||
{
|
||||
sn_hwperf_call_sal(info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
|
||||
{
|
||||
u32 cpu;
|
||||
u32 use_ipi;
|
||||
int r = 0;
|
||||
cpumask_t save_allowed;
|
||||
|
||||
cpu = (op_info->a->arg & SN_HWPERF_ARG_CPU_MASK) >> 32;
|
||||
use_ipi = op_info->a->arg & SN_HWPERF_ARG_USE_IPI_MASK;
|
||||
@@ -629,13 +634,9 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
|
||||
/* use an interprocessor interrupt to call SAL */
|
||||
smp_call_function_single(cpu, sn_hwperf_call_sal,
|
||||
op_info, 1);
|
||||
}
|
||||
else {
|
||||
/* migrate the task before calling SAL */
|
||||
save_allowed = current->cpus_allowed;
|
||||
set_cpus_allowed_ptr(current, cpumask_of(cpu));
|
||||
sn_hwperf_call_sal(op_info);
|
||||
set_cpus_allowed_ptr(current, &save_allowed);
|
||||
} else {
|
||||
/* Call on the target CPU */
|
||||
work_on_cpu_safe(cpu, sn_hwperf_call_sal_work, op_info);
|
||||
}
|
||||
}
|
||||
r = op_info->ret;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user