Revision 494de90098784b8e2797598cefdd34188884ec2e authored by Mel Gorman on 03 July 2008, 04:27:51 UTC, committed by Linus Torvalds on 03 July 2008, 16:22:59 UTC
The non-NUMA case of build_zonelist_cache() would initialize the
zlcache_ptr for both node_zonelists[] to NULL.

Which is problematic, since non-NUMA only has a single node_zonelists[]
entry, and trying to zero the non-existent second one just overwrote the
nr_zones field instead.

As kswapd uses this value to determine what reclaim work is necessary,
the result is that kswapd never reclaims.  This causes processes to
stall frequently in low-memory situations as they always direct reclaim.
This patch initialises zlcache_ptr correctly.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Tested-by: Dan Williams <dan.j.williams@intel.com>
[ Simplified patch a bit ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c461a97
Raw File
Makefile
#
# arch/h8300/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# (C) Copyright 2002,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
#

platform-$(CONFIG_CPU_H8300H)	:= h8300h
platform-$(CONFIG_CPU_H8S)	:= h8s
PLATFORM := $(platform-y)

board-$(CONFIG_H8300H_GENERIC)		:= generic
board-$(CONFIG_H8300H_AKI3068NET)	:= aki3068net
board-$(CONFIG_H8300H_H8MAX)		:= h8max
board-$(CONFIG_H8300H_SIM)		:= generic
board-$(CONFIG_H8S_GENERIC)		:= generic
board-$(CONFIG_H8S_EDOSK2674)		:= edosk2674
board-$(CONFIG_H8S_SIM)			:= generic
BOARD := $(board-y)

model-$(CONFIG_RAMKERNEL)	:= ram
model-$(CONFIG_ROMKERNEL)	:= rom
MODEL := $(model-y)

cflags-$(CONFIG_CPU_H8300H)	:= -mh
ldflags-$(CONFIG_CPU_H8300H)	:= -mh8300helf
cflags-$(CONFIG_CPU_H8S)	:= -ms
ldflags-$(CONFIG_CPU_H8S)	:= -mh8300self

KBUILD_CFLAGS += $(cflags-y)
KBUILD_CFLAGS += -mint32 -fno-builtin
KBUILD_CFLAGS += -g
KBUILD_CFLAGS += -D__linux__
KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
LDFLAGS += $(ldflags-y)

CROSS_COMPILE = h8300-elf-
LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o

core-y	+= arch/$(ARCH)/kernel/ \
	   arch/$(ARCH)/mm/
ifdef PLATFORM
core-y	+= arch/$(ARCH)/platform/$(PLATFORM)/ \
	   arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/
endif

libs-y	+= arch/$(ARCH)/lib/ $(LIBGCC)

boot := arch/h8300/boot

export MODEL PLATFORM BOARD

archmrproper:

archclean:
	$(Q)$(MAKE) $(clean)=$(boot)

vmlinux.srec vmlinux.bin zImage: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

define archhelp
  @echo  'vmlinux.bin  - Create raw binary'
  @echo  'vmlinux.srec - Create srec binary'
  @echo  'zImage       - Compressed kernel image'
endef
back to top