xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix race while discarding buffers [V4]

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfs: fix race while discarding buffers [V4]
From: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Date: Mon, 20 Aug 2012 19:47:51 -0300
In-reply-to: <20120820205134.GB29979@xxxxxxx>
Mail-followup-to: xfs@xxxxxxxxxxx
References: <1344621711-8049-1-git-send-email-cmaiolino@xxxxxxxxxx> <20120820205134.GB29979@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
Hi Ben,
> 
> 
Thanks for the comments.
> 
> What was the symptom that led to the discovery of this problem?
> 
> Reviewed-by: Ben Myers <bpm@xxxxxxx>
> 

It started with the messages like the example below being logged by syslog:

shrink_slab: xfs_buftarg_shrink+0x0/0x160 [xfs] negative objects to delete 
nr=-61993820
shrink_slab: xfs_buftarg_shrink+0x0/0x160 [xfs] negative objects to delete 
nr=-146
shrink_slab: xfs_buftarg_shrink+0x0/0x160 [xfs] negative objects to delete 
nr=-240601220
shrink_slab: xfs_buftarg_shrink+0x0/0x160 [xfs] negative objects to delete 
nr=-152
shrink_slab: xfs_buftarg_shrink+0x0/0x160 [xfs] negative objects to delete 
nr=-2921236993

These messages came from shrink_slab().

After that I've added a second counter into the xfs_buftarg_shrink() to check
the amount of elements in list (via list_for_each() macro) to confirm the
discrepancy between the counter and the real number of elements in list, and
last, Eric added a second and local counter to xfs_buftarg_shrink, to account
the number of buffers being added and removed from the dispose list into each
call to xfs_buftarg_shrink(), where, when the problem started, we could see a
wrong number of buffers beind added and/or removed from the dispose list.

Cheers.

-- 
--Carlos

<Prev in Thread] Current Thread [Next in Thread>