Whamcloud - gitweb
LU-3281 osc: some cleanup to reduce stack overflow chance
authorBobi Jam <bobijam.xu@intel.com>
Mon, 6 May 2013 15:38:21 +0000 (23:38 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 8 May 2013 18:12:04 +0000 (14:12 -0400)
commitf7a81d4797933d179f9955bb0821779d3ac9a8fe
tree50cdb94d35697bc5f8eaa30a769b78c9d6f3f07e
parente32ce066d231c8879aad52e518b508fa570af9ab
LU-3281 osc: some cleanup to reduce stack overflow chance

ptlrpcd_add_req() will wake_up other process, do not hold a spinlock
before calling ptlrpcd_queue_work()->ptlrpcd_add_req().

If current process is allocating memory, memory shrinker could get to
osc_lru_del(), don't call osc_lru_shrink() further since it could
lead a long calling chain.

Use static string OES_STRINGS in OSC_EXTENT_DUMP() to reduce stack
footprint.

Alloc crattr on heap for osc_build_rpc() to reduce stack footprint.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I1a1ce0b46850773a2ae45ce16be6b708adc40ab8
Reviewed-on: http://review.whamcloud.com/6270
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osc/osc_cache.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_page.c
lustre/osc/osc_request.c