>> Btw, I've been looking at why Andrea thinks he's patches are needed,2.1.127pre6
commitc8cff32578afd1c895e4272ad67d36ed938e4383
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:07 +0000 (23 15:17 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:17:07 +0000 (23 15:17 -0500)
tree86e8acb98242234fd8ac24476401f80fbd68a409
parent8e1e477eaf6bc974ae68d2b8b29cd5a39a80dc14
>> Btw, I've been looking at why Andrea thinks he's patches are needed,
>> because I looked very deep and the patches really shouldn't have made any
>> real difference..
>> The reason - tadaam - is so silly that it's embarrassing. The thing is,
>> that the things that should use GFP_USER don't. They use GFP_KERNEL
>> instead, and that is sufficient to explain all the problems that Andrea
>> saw. Becuase GFP_KERNEL will continue to allow allocations even after the
>> freeing up of another page has failed.
>> After fixing that in mm/memory.c and mm/filemap.c, the problem seems to be
>> properly fixed.

> I thought to change that but I was not sure (and infact some email ago I
> asked that to you too). I have not changed that myself because I was
> worryed that userspace allocation could be too much light. It would be
> nice to know if using GFP_USER and disabling kswapd (at the end of
> vmscan.c) causes process to segfaults (so that we can know if a real time
> process can alloc/swapout memory safely).

I wonder why it wasn't GFP_USER - that's exactly what the thing is there
for, and I don't know when it was changed. Probably with the new page
cache or something. I just looked at the memory allocator, and it looked
like it was doing the right thing, and it _was_ - but because it was
called with GFP_KERNEL it tried harder than it should have to return a
good page even when it ran out of memory.
Anyway, I made a pre-patch-2.1.127-6 and put it on ftp.kernel.org (pre-4
and pre-5 have been my internal pre-patches and don't show up there). This
has the timeout code basic fixes and the mm fixes, and doesn't fall over
for me with Andreas memory load case.

Linus
106 files changed:
Documentation/specialix.txt
arch/alpha/defconfig
arch/i386/defconfig
arch/i386/kernel/setup.c
arch/ppc/apus_defconfig
arch/ppc/chrp_defconfig
arch/ppc/common_defconfig
arch/ppc/defconfig
arch/ppc/mbx_defconfig
arch/ppc/pmac_defconfig
arch/ppc/prep_defconfig
drivers/block/ide-cd.c
drivers/block/md.c
drivers/cdrom/gscd.c
drivers/char/bw-qcam.c
drivers/char/c-qcam.c
drivers/char/console.c
drivers/char/cyclades.c
drivers/char/dsp56k.c
drivers/char/epca.c
drivers/char/esp.c
drivers/char/istallion.c
drivers/char/lp.c
drivers/char/msp3400.c
drivers/char/n_tty.c
drivers/char/pc_keyb.c
drivers/char/qpmouse.c
drivers/char/serial.c
drivers/char/specialix.c
drivers/char/specialix_io8.h
drivers/char/tty_io.c
drivers/char/tty_ioctl.c
drivers/char/tuner.c
drivers/isdn/hisax/isdnl1.c
drivers/isdn/isdn_tty.c
drivers/isdn/isdnloop/isdnloop.c
drivers/misc/parport_ieee1284.c
drivers/net/ppp.c
drivers/net/tlan.c
drivers/pci/oldproc.c
drivers/scsi/aic7xxx.c
drivers/scsi/scsi_obsolete.c
drivers/sound/dmabuf.c
drivers/sound/midibuf.c
drivers/sound/sequencer.c
drivers/video/mdacon.c
fs/exec.c
fs/ext2/balloc.c
fs/ext2/super.c
fs/fat/mmap.c
fs/hfs/ChangeLog
fs/hfs/TODO
fs/hfs/bnode.c
fs/hfs/catalog.c
fs/hfs/dir.c
fs/hfs/dir_cap.c
fs/hfs/dir_dbl.c
fs/hfs/dir_nat.c
fs/hfs/extent.c
fs/hfs/file.c
fs/hfs/file_cap.c
fs/hfs/file_hdr.c
fs/hfs/hfs.h
fs/hfs/inode.c
fs/hfs/mdb.c
fs/hfs/string.c
fs/hfs/super.c
fs/hfs/sysdep.c
fs/hfs/version.c
fs/lockd/clntlock.c
fs/lockd/clntproc.c
fs/lockd/svc.c
fs/nfs/inode.c
fs/nfsd/auth.c
fs/nfsd/nfssvc.c
fs/nfsd/vfs.c
fs/proc/array.c
fs/select.c
fs/ufs/util.h
include/linux/lp.h
include/linux/mm.h
include/linux/pci.h
include/linux/poll.h
include/linux/sched.h
include/linux/sunrpc/svcsock.h
include/linux/timer.h
include/linux/tty.h
include/net/sock.h
include/net/tcp.h
kernel/itimer.c
kernel/ksyms.c
kernel/sched.c
kernel/signal.c
mm/filemap.c
mm/memory.c
mm/mmap.c
mm/page_alloc.c
mm/swapfile.c
mm/vmscan.c
net/core/sysctl_net_core.c
net/ipv4/af_inet.c
net/ipv4/raw.c
net/ipv4/tcp.c
net/ipv4/udp.c
net/sunrpc/sched.c
net/sunrpc/svcsock.c