[PATCH v4 08/18] x86/intel_rdt: Pick up L3/L2 RDT parameters from CPUID

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Define struct rdt_resource to hold all the parameterized values for an RDT resource. Fill in some of those values from CPUID leaf 0x10 (on Haswell we hard code them). Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck --- arch/x86/include/asm/intel_rdt.h | 62

[PATCH v4 17/18] x86/intel_rdt: Add scheduler hook

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Hook the x86 scheduler code to update closid based on whether the current task is assigned to a specific closid or running on a CPU assigned to a specific closid. Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck --- arch/x86/include/asm/intel_rdt.h | 41

[PATCH v4 06/18] x86/intel_rdt: Add CONFIG, Makefile, and basic initialization

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Introduce CONFIG_INTEL_RDT_A (default: no, dependent on X86 and CPU_SUP_INTEL) to control inclusion of Resource Director Technology in the build. Simple init() routine just checks which features are present. If they are pr_info() one line summary for each feature. Signed-off-by

[PATCH v4 07/18] x86/intel_rdt: Add Haswell feature discovery

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Some Haswell generation CPUs support RDT, but they don't enumerate this using CPUID. Use rdmsr_safe() and wrmsr_safe() to probe the MSRs on cpu model 63 (INTEL_FAM6_HASWELL_X) Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck --- arch/x86/events/intel/cqm.c | 2

[PATCH v4 18/18] MAINTAINERS: Add maintainer for Intel RDT resource allocation

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu We create five new files for Intel RDT resource allocation: arch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt_rdtgroup.c arch/x86/kernel/cpu/intel_rdt_schemata.c arch/x86/include/asm/intel_rdt.h Documentation/x86/intel_rdt_ui.txt Fenghua Yu will maintain this code.

[PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Resource control groups are represented as directories in the resctrl file system. The root directory describes the default resources available to tasks that have not been assigned specific resources. Other directories can be created at the root level to make new resource groups.

[PATCH v4 02/18] cacheinfo: Introduce cache id

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Cache management software needs a name for each instance of a cache of a particular type. The current cacheinfo structure does not provide any information about the underlying hardware so there is no way to expose it. Hardware with cache management features provides means (cpui

[PATCH v4 16/18] x86/intel_rdt: Add schemata file

2016-10-14 Thread Fenghua Yu
From: Tony Luck Last of the per resource group files. Also mode 0644. This one shows the resources available to the group. Syntax depends on whether the "cdp" mount option was given. With code/data prioritization disabled it is simply a list of masks for each cache domain. Initial value allows ac

[PATCH v4 14/18] x86/intel_rdt: Add cpus file

2016-10-14 Thread Fenghua Yu
From: Tony Luck Now we populate each directory with a read/write (mode 0644) file named "cpus". This is used to over-ride the resources available to processes in the default resource group when running on specific CPUs. Each "cpus" file reads as a cpumask showing which CPUs belong to this resour

[PATCH v4 11/18] x86/intel_rdt: Add basic resctrl filesystem support

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Use kernfs as basis for our user interface filesystem. This patch supports mount/umount, and one mount parameter "cdp" to enable code/data prioritization (though all we do at this point is ensure that the system can support CDP). The file system is not populated yet in this patc

[PATCH v4 12/18] x86/intel_rdt: Add "info" files to resctrl file system

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu For the convenience of applications we make the decoded values of some of the CPUID values available in read-only (0444) files. Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck --- arch/x86/include/asm/intel_rdt.h | 24 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.

[PATCH v4 15/18] x86/intel_rdt: Add tasks files

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu The root directory all subdirectories are automatically populated with a read/write (mode 0644) file named "tasks". When read it will show all the task IDs assigned to the resource group. Tasks can be added (one at a time) to a group by writing the task ID to the file. E.g. Memb

[PATCH v4 04/18] x86/intel_rdt: Feature discovery

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Check CPUID leaves for all the Resource Director Technology (RDT) Cache Allocation Technology (CAT) bits. Presence of allocation features: CPUID.(EAX=7H, ECX=0):EBX[bit 15] X86_FEATURE_RDT_A L2 and L3 caches are each separately enabled: CPUID.(EAX=10H, ECX=0):EBX[bit 1]

[PATCH v4 01/18] Documentation, ABI: Add a document entry for cache id

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Add an ABI document entry for /sys/devices/system/cpu/cpu*/cache/index*/id. Signed-off-by: Fenghua Yu Signed-off-by: Tony Luck --- Documentation/ABI/testing/sysfs-devices-system-cpu | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/ABI/testin

[PATCH v4 03/18] x86, intel_cacheinfo: Enable cache id in x86

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu Cache id is retrieved from APIC ID and CPUID leaf 4 on x86. For more details see the section on "Cache ID Extraction Parameters" in "Intel 64 Architecture Processor Topology Enumeration" at https://software.intel.com/sites/default/files/63/1a/Kuo_CpuTopology_rc1.rh1.final.pdf A

[PATCH v4 09/18] x86/cqm: Move PQR_ASSOC management code into generic code used by both CQM and CAT

2016-10-14 Thread Fenghua Yu
From: Fenghua Yu A CLOSID goes into effect when written to the PQR_ASSOC MSR. But this MSR also contains the RMID used for preformance monitoring of cache occupancy and memory bandwidth. Move the management code for this MSR out of arch/x86/events/intel/cqm.c and into generic RDT code so we can c

[PATCH v4 10/18] x86/intel_rdt: Build structures for each resource based on cache topology

2016-10-14 Thread Fenghua Yu
From: Tony Luck We use the cpu hotplug notifier to catch each cpu in turn and look at its cache topology w.r.t each of the resource groups. As we discover new resources, we initialize the bitmask array for each to the default (full access) value. Signed-off-by: Tony Luck Signed-off-by: Fenghua

[PATCH] mailbox: PCC: Fix return value of pcc_mbox_request_channel()

2016-10-14 Thread Hoan Tran
When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of this function use IS_ERR() to check for error code. Signed-off-by: Duc Dang Signed-off-by: Hoan Tran --- include/acpi/pcc.h | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH] mailbox: PCC: Fix lockdep warning when request PCC channel

2016-10-14 Thread Prakash, Prashanth
Hi Hoan, On 10/14/2016 4:52 PM, Hoan Tran wrote: > This patch fixes the lockdep warning below > > [7.229767] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) > [7.229776] [ cut here ] > [7.229787] WARNING: CPU: 1 PID: 1 at > linux-next/kernel/locking/lockdep.c:2

Re: [GIT PULL] final round of SCSI updates for the 4.8+ merge window

2016-10-14 Thread Finn Thain
On Fri, 14 Oct 2016, James Bottomley wrote: > This is just a set of minor updates and fixes which weren't quite ready > in time for the first pull request. The only real thing of note is > Mike Christie is stepping down as Maintainer of iscsi to be replaced by > Lee Duncan and Chris Leech. > >

Re: [bug/regression] libhugetlbfs testsuite failures and OOMs eventually kill my system

2016-10-14 Thread Mike Kravetz
On 10/14/2016 01:48 AM, Jan Stancek wrote: > On 10/14/2016 01:26 AM, Mike Kravetz wrote: >> >> Hi Jan, >> >> Any chance you can get the contents of /sys/kernel/mm/hugepages >> before and after the first run of libhugetlbfs testsuite on Power? >> Perhaps a script like: >> >> cd /sys/kernel/mm/hugepa

[PATCH 1/2] sunqe: Fix compiler warnings

2016-10-14 Thread Tushar Dave
sunqe uses '__u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enables 64bit DMA and therefore dma_addr_t bec

[PATCH 0/2] net: Fix compiler warnings

2016-10-14 Thread Tushar Dave
Recently, ATU (iommu) changes are submitted to linux-sparc that enables 64bit DMA on SPARC. However, this change also makes 'incompatible pointer type' compiler warnings inevitable on sunqe and sunbmac driver. The two patches in series fix compiler warnings. Tushar Dave (2): sunqe: Fix compiler

[PATCH 2/2] sunbmac: Fix compiler warning

2016-10-14 Thread Tushar Dave
sunbmac uses '__u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enables 64bit DMA and therefore dma_addr_t b

Re: [PATCH] logfs: remove from tree

2016-10-14 Thread Al Viro
On Sun, Sep 11, 2016 at 03:04:22PM +0200, Christoph Hellwig wrote: > Logfs was introduced to the kernel in 2009, and hasn't seen any non > drive-by changes since 2012, while having lots of unsolved issues > including the complete lack of error handling, with more and more > issues popping up withou

[git pull] (vfs.git) more misc bits

2016-10-14 Thread Al Viro
The rest of the stuff from -next (more uaccess work) + assorted fixes. The following changes since commit de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3: Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media (2016-10-11 13:22:22 -0700) are available

Re: [PATCH] mailbox: PCC: Fix lockdep warning when request PCC channel

2016-10-14 Thread Hoan Tran
Hi Prashanth, On Fri, Oct 14, 2016 at 4:44 PM, Prakash, Prashanth wrote: > Hi Hoan, > > On 10/14/2016 4:52 PM, Hoan Tran wrote: >> This patch fixes the lockdep warning below >> >> [7.229767] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) >> [7.229776] [ cut here ]--

Re: Oops on Power8 (was Re: [PATCH v2 1/7] workqueue: make workqueue available early during boot)

2016-10-14 Thread Balbir Singh
On 15/10/16 02:07, Tejun Heo wrote: > Hello, Michael. > > On Tue, Oct 11, 2016 at 10:22:13PM +1100, Michael Ellerman wrote: >> The oops happens because we're in enqueue_task_fair() and p->se->cfs_rq >> is NULL. >> >> The cfs_rq is NULL because we did set_task_rq(p, 2048), where 2048 is >> NR_CPU

[problem on 32-bit systems] changing the type of clk_rate to "long long"?

2016-10-14 Thread Masahiro Yamada
Hi. When I was testing my clk driver + generic cpufreq driver, I was hit by a problem. Everything worked fine on my 64-bit SoCs, but not on 32-bit SoCs. I found the cause of the problem was that the type of clk_rate is "long". It is long enough on 64-bit systems, but only 32-bit wide on 32-b

Re: Oops on Power8 (was Re: [PATCH v2 1/7] workqueue: make workqueue available early during boot)

2016-10-14 Thread Balbir Singh
On 15/10/16 02:08, Tejun Heo wrote: > Hello, Balbir. > > On Tue, Oct 11, 2016 at 11:21:09PM +1100, Balbir Singh wrote: >> FYI: I see the samething on my cpu as well, its just that I get lucky >> and cpu_online(cpu) returns false. > > Are you seeing this on x86 or is your test setup also a power

Re: [PATCH V2 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"

2016-10-14 Thread Sinan Kaya
On 10/12/2016 6:46 PM, Sinan Kaya wrote: >> Which API are you thinking about here? pcibios_penalize_isa_irq() is >> > called by ACPI and PNP, which should both be after ACPI is started. > Correct, I was talking about acpi_penalize_sci_irq function here. > Now that I'm looking at the code. There

[PATCH V3 2/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"

2016-10-14 Thread Sinan Kaya
The SCI function was removed in two steps (first refactor and then remove). This patch does the revert in one step. The commit 103544d86976 ("ACPI,PCI,IRQ: reduce resource requirements") refactored the original code so that SCI penalty is calculated dynamically by the time get_penalty function is

[PATCH V3 3/3] ACPI,PCI,IRQ: correct SCI penalty calculation

2016-10-14 Thread Sinan Kaya
It seems like the problem is that we removed acpi_penalize_sci_irq(), which told us the polarity and trigger mode. We tried to get that information via irq_get_trigger_type(), but that didn't work in this case because we use the acpi_irq_get_penalty() path before the SCI is registered. To fix thi

[PATCH V3 1/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

2016-10-14 Thread Sinan Kaya
The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce resource requirements") removed PCI_USING penalty from acpi_pci_link_allocate function as there is no longer a fixed size penalty array for both PCI interrupts greater than 16. The array size has been reduced to 16 and array name

Re: [PATCH] p54: memset(0) whole array

2016-10-14 Thread Christian Lamparter
On Friday, October 14, 2016 11:23:09 AM CEST Jiri Slaby wrote: > gcc 7 complains: > drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan': > drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with > length equal to number of elements without multiplication by element

Re: [PATCH v5] kprobes: unpoison stack in jprobe_return() for KASAN

2016-10-14 Thread Ingo Molnar
* Dmitry Vyukov wrote: > KASAN stack instrumentation poisons stack redzones on function entry > and unpoisons them on function exit. If a function exits abnormally > (e.g. with a longjmp like jprobe_return()), stack redzones are left > poisoned. Later this leads to random KASAN false reports. >

<    1   2   3   4   5   6