linux_dsm_epyc7002/drivers/pci
Lee Schermerhorn 74e27e44b0 PCI: Mem Policy: fix mempolicy usage in pci driver
In an attempt to ensure memory allocation from the local node, the pci
driver temporarily replaces the current task's memory policy with the
system default policy.  Trying to be a good citizen, the driver then call's
mpol_get() on the new policy.  When it's finished probing, it undoes the
'_get by calling mpol_free() [on the system default policy] and then
restores the current task's saved mempolicy.

A couple of issues here:

1) it's never necessary to set a task's mempolicy to the
   system default policy in order to get system default
   allocation behavior.  Simply set the current task's
   mempolicy to NULL and allocations will fall back to
   system default policy.

2) we should never [need to] call mpol_free() on the system
   default policy.  [I plan on trapping this with a VM_BUG_ON()
   in a subsequent patch.]

This patch removes the calls to mpol_get() and mpol_free()
and uses NULL for the temporary task mempolicy to effect
default allocation behavior.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 15:04:20 -08:00
..
hotplug PCI: hotplug: Link fakephp last 2008-02-01 15:04:20 -08:00
pcie pcie port driver: correctly detect native PME feature 2008-02-01 15:04:18 -08:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
bus.c PCI: drivers/pci/: remove unused exports 2008-02-01 15:04:18 -08:00
dmar.c Intel IOMMU: DMAR detection and parsing logic 2007-10-22 08:13:18 -07:00
hotplug.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
htirq.c PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c 2006-12-20 10:54:42 -08:00
intel-iommu.c intel-iommu: Fix array overflow 2007-10-30 08:06:55 -07:00
intel-iommu.h intel-iommu fixes 2007-10-29 07:41:32 -07:00
iova.c intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
iova.h intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
Kconfig PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
Makefile [POWERPC] Always build setup-bus.c on powerpc 2008-01-27 14:07:37 -06:00
msi.c PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set. 2007-11-05 13:35:16 -08:00
msi.h PCI: Make some MSI-X #defines generic 2006-12-01 14:36:56 -08:00
pci-acpi.c PCI: drivers/pci/: remove unused exports 2008-02-01 15:04:18 -08:00
pci-driver.c PCI: Mem Policy: fix mempolicy usage in pci driver 2008-02-01 15:04:20 -08:00
pci-sysfs.c PCI: drivers/pci/pci-sysfs.c: Add missing pci_dev_put 2007-11-28 14:35:26 -08:00
pci.c pcie: utilize pcie transaction pending bit 2008-02-01 15:04:19 -08:00
pci.h Intel IOMMU: PCI generic helper function 2007-10-22 08:13:18 -07:00
probe.c PCI: drivers/pci/: remove unused exports 2008-02-01 15:04:18 -08:00
proc.c PCI: drivers/pci/: remove unused exports 2008-02-01 15:04:18 -08:00
quirks.c PCI: VIA CX700 quirk to disable PCI Bus Parking 2008-02-01 15:04:20 -08:00
remove.c PCI: add pci_stop_bus_device 2006-09-26 17:43:54 -07:00
rom.c PCI: drivers/pci/rom.c: #if 0 two functions 2008-02-01 15:04:18 -08:00
search.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
setup-bus.c PCI: remove transparent bridge sizing 2007-10-12 15:03:17 -07:00
setup-irq.c kobjects: fix up improper use of the kobject name field 2007-10-12 14:51:02 -07:00
setup-res.c PCI: drivers/pci/: remove unused exports 2008-02-01 15:04:18 -08:00
syscall.c pci syscall.c: Switch to refcounting API 2007-07-11 16:02:07 -07:00