* Re: [dm-devel] new dm-bufio
[not found] ` <20110823185423.GA10936@infradead.org>
@ 2011-08-29 18:53 ` Mikulas Patocka
2011-08-30 1:49 ` [xfs-masters] " Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2011-08-29 18:53 UTC (permalink / raw)
To: xfs, xfs-masters, Christoph Hellwig
Cc: device-mapper development, Joe Thornber, Mike Snitzer,
Alasdair G. Kergon
On Tue, 23 Aug 2011, Christoph Hellwig wrote:
> FYI, the "shrinker" interface in include/linux/shrinker.h is how the
> VM tells subsystems to shrink their memory usage. It is used for
> various slab caches, and the XFS buffercache in
> fs/xfs/linux-2.6/xfs_buf.c
BTW. shrinker functions from xfs_qm.c - xfs_qm_shake and
xfs_qm_shake_freelist - look completely bogus. They don't read
sc->nr_to_scan to determine how many values they should scan (and compare
it with zero to test if they should scan at all) and they return the
number of entries freed - the interface specifies that they should return
the number of entries remaining the in cache.
Mikulas
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [xfs-masters] [dm-devel] new dm-bufio
2011-08-29 18:53 ` [dm-devel] new dm-bufio Mikulas Patocka
@ 2011-08-30 1:49 ` Dave Chinner
2011-08-30 5:27 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Dave Chinner @ 2011-08-30 1:49 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Joe Thornber, Mike Snitzer, xfs, Christoph Hellwig, xfs-masters,
device-mapper development, Alasdair G. Kergon
On Mon, Aug 29, 2011 at 02:53:51PM -0400, Mikulas Patocka wrote:
> On Tue, 23 Aug 2011, Christoph Hellwig wrote:
>
> > FYI, the "shrinker" interface in include/linux/shrinker.h is how the
> > VM tells subsystems to shrink their memory usage. It is used for
> > various slab caches, and the XFS buffercache in
> > fs/xfs/linux-2.6/xfs_buf.c
>
> BTW. shrinker functions from xfs_qm.c - xfs_qm_shake and
> xfs_qm_shake_freelist - look completely bogus. They don't read
> sc->nr_to_scan to determine how many values they should scan (and compare
> it with zero to test if they should scan at all) and they return the
> number of entries freed - the interface specifies that they should return
> the number of entries remaining the in cache.
It's a relic from the days of Irix that we've kept around and never
really touched because it's never shown up as a problem. Such code
is cleaned up as we go along or as problems arise.
As it is, this patchset:
http://thread.gmane.org/gmane.linux.kernel.mm/67326
that I'm currently working on changes the shrinker API to be much
more sane - the shrinker now has a separate "count objects"
operation and the "scan objects" operation now returns the number of
items freed rather than the number of items left in the cache.
As the API is being changed, the xfs_qm shrinker is also fixed to
return the right values according to the new API. It still doesn't
pay attention to nr_to_scan, but that's not a big deal and will get
addressed in future when other upcoming changes are made to the
code....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [xfs-masters] [dm-devel] new dm-bufio
2011-08-30 1:49 ` [xfs-masters] " Dave Chinner
@ 2011-08-30 5:27 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2011-08-30 5:27 UTC (permalink / raw)
To: Dave Chinner
Cc: Joe Thornber, Mike Snitzer, xfs, Christoph Hellwig, xfs-masters,
device-mapper development, Mikulas Patocka, Alasdair G. Kergon
On Tue, Aug 30, 2011 at 11:49:06AM +1000, Dave Chinner wrote:
>
> It's a relic from the days of Irix that we've kept around and never
> really touched because it's never shown up as a problem. Such code
> is cleaned up as we go along or as problems arise.
>
> As it is, this patchset:
>
> http://thread.gmane.org/gmane.linux.kernel.mm/67326
>
> that I'm currently working on changes the shrinker API to be much
> more sane - the shrinker now has a separate "count objects"
> operation and the "scan objects" operation now returns the number of
> items freed rather than the number of items left in the cache.
I think if you find bugs like that they should be in patches separate
from the main conversion. Especially given that the 3.2 merge window
is getting closer a first batch of patches with these fixes and some
of the preparatory icache/dcache changes that can go into linux-next
ASAP would be nice.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-30 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.1108221600510.26651@hs20-bc2-1.build.redhat.com>
[not found] ` <20110823113048.GC5442@ubuntu>
[not found] ` <Pine.LNX.4.64.1108231012560.2629@hs20-bc2-1.build.redhat.com>
[not found] ` <20110823185423.GA10936@infradead.org>
2011-08-29 18:53 ` [dm-devel] new dm-bufio Mikulas Patocka
2011-08-30 1:49 ` [xfs-masters] " Dave Chinner
2011-08-30 5:27 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox