| To: | Lachlan McIlroy <lachlan@xxxxxxx> |
|---|---|
| Subject: | Re: [REVIEW] Move memory allocations for log tracing out of the critical path |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Wed, 13 Aug 2008 09:54:48 -0400 |
| Cc: | xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx> |
| In-reply-to: | <48A11F4C.6000002@xxxxxxx> |
| References: | <48A11F4C.6000002@xxxxxxx> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Tue, Aug 12, 2008 at 03:27:40PM +1000, Lachlan McIlroy wrote: > 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. Looks good to me. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: TAKE 985525 - Fix use after free in xfs_log_done()., Martin Steigerwald |
|---|---|
| Next by Date: | Re: [PATCH] XFS: factor xfs_iget_core() into hit and miss cases, Christoph Hellwig |
| Previous by Thread: | [REVIEW] Move memory allocations for log tracing out of the critical path, Lachlan McIlroy |
| Next by Thread: | Re: [PATCH 1/2] CRED: Alter XFS so as to avoid namespace collisions with upcoming COW creds, James Morris |
| Indexes: | [Date] [Thread] [Top] [All Lists] |