xfs
[Top] [All Lists]

TAKE 983738 - Move memory allocations for log tracing out of the critica

To: sgi.bugs.xfs@xxxxxxxxxxxx, xfs@xxxxxxxxxxx
Subject: TAKE 983738 - Move memory allocations for log tracing out of the critical path
From: lachlan@xxxxxxx (Lachlan McIlroy)
Date: Thu, 14 Aug 2008 15:06:57 +1000 (EST)
Sender: xfs-bounce@xxxxxxxxxxx
Move memory allocations for log tracing out of the critical path

Memory allocations for log->l_grant_trace and iclog->ic_trace are done
on demand when the first event is logged.  In xlog_state_get_iclog_space()
we call xlog_trace_iclog() under a spinlock and allocating memory here can
cause us to sleep with a spinlock held and deadlock the system.

For the log grant tracing we use KM_NOSLEEP but that means we can lose
trace entries.  Since there is no locking to serialize the log grant
tracing we could race and have multiple allocations and leak memory.

So move the allocations to where we initialize the log/iclog structures.
Use KM_NOFS to avoid recursing into the filesystem and drop log->l_trace
since it's not even used. 

Date:  Thu Aug 14 15:06:10 AEST 2008
Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-clean
Inspected by:  hch
Author:  lachlan

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:31896a
fs/xfs/xfsidbg.c - 1.361 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.361&r2=text&tr2=1.360&f=h
fs/xfs/xfs_log.c - 1.364 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.364&r2=text&tr2=1.363&f=h
fs/xfs/xfs_log_priv.h - 1.134 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_priv.h.diff?r1=text&tr1=1.134&r2=text&tr2=1.133&f=h
        - Move memory allocations for log tracing out of the critical path




<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 983738 - Move memory allocations for log tracing out of the critical path, Lachlan McIlroy <=