]> git.baikalelectronics.ru Git - kernel.git/commit
libipw: split ieee->networks into small pieces
authorZhu Yi <yi.zhu@intel.com>
Mon, 8 Mar 2010 05:18:03 +0000 (13:18 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Mar 2010 21:16:55 +0000 (16:16 -0500)
commit24d0460794eb1e1caf1edab962ab05540ce90792
treed302d7fc27edf87c78e50ee24608554240d99dec
parent19ca269f3a4bb776b526aec30526cac89f51191f
libipw: split ieee->networks into small pieces

The ieee->networks consists of 128 struct libipw_network entries. If
we allocate this chunk of memory altogether, it ends up with an
order 4 page allocation. High order page allocation is likely to fail
on system high load. This patch splits the big chunk memory allocation
into small pieces, each is 344 bytes, allocates them with 128 times.

The patch fixed bug http://bugzilla.kernel.org/show_bug.cgi?id=14989

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/libipw.h
drivers/net/wireless/ipw2x00/libipw_module.c