On 14 February 2016 at 10:29, Karel Gardas <gard...@gmail.com> wrote: > On Sat, Feb 13, 2016 at 9:39 PM, Stuart Henderson <s...@spacehopper.org> > wrote: >> There was this commit, I don't *think* it got reverted. >> >> >> >> CVSROOT: /cvs >> Module name: src >> Changes by: b...@cvs.openbsd.org 2013/06/11 13:01:20 >> >> Modified files: >> sys/kern : kern_sysctl.c spec_vnops.c vfs_bio.c >> vfs_biomem.c vfs_vops.c >> sys/sys : buf.h mount.h >> sys/uvm : uvm_extern.h uvm_page.c >> usr.bin/systat : iostat.c >> >> Log message: >> High memory page flipping for the buffer cache. >> >> This change splits the buffer cache free lists into lists of dma reachable >> buffers and high memory buffers based on the ranges returned by pmemrange. >> Buffers move from dma to high memory as they age, but are flipped to dma >> reachable memory if IO is needed to/from and high mem buffer. The total >> amount of buffers allocated is now bufcachepercent of both the dma and >> the high memory region. >> >> This change allows the use of large buffer caches on amd64 using more than >> 4 GB of memory >> >> ok tedu@ krw@ - testing by many. > > I think it got reverted by: > > commit ac77fb26761065b7f6031098e6a182cacfaf7437 > Author: beck <b...@openbsd.org> > Date: Tue Jul 9 15:37:43 2013 +0000 > > back out the cache flipper temporarily to work out of tree. > will come back soon. > ok deraadt@ > > > but I'm not an expert so would wait on confirmation by Bob Beck.
Yes, I think you are correct, and it was indeed reverted. Some parts have since been reimplemented and brought back by http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/kern/vfs_bio.c#rev1.170 on 2015/07/19: http://marc.info/?l=openbsd-cvs&m=143732292523715&w=2 > CVSROOT: /cvs > Module name: src > Changes by: b...@cvs.openbsd.org 2015/07/19 10:21:11 > > Modified files: > sys/kern : vfs_bio.c vfs_vops.c > sys/sys : buf.h > > Log message: > Use two 2q caches for the buffer cache, moving previously warm buffers from > the > first queue to the second. > Mark the first queue as DMA in preparation for being able to use more memory > by flipping. Flipper code currently only sets and clears the flag. > ok tedu@ guenther@ But it looks like the functions that were introduced in the above commit are still WIP and don't actually flip anything yet: http://bxr.su/o/sys/kern/vfs_bio.c#buf_flip_high 307buf_flip_high(struct buf *bp) 308{ 309 KASSERT(ISSET(bp->b_flags, B_BC)); 310 KASSERT(ISSET(bp->b_flags, B_DMA)); 311 KASSERT(bp->cache == DMA_CACHE); 312 CLR(bp->b_flags, B_DMA); 313 /* XXX does nothing to buffer for now */ 314} http://bxr.su/o/sys/kern/vfs_bio.c#buf_flip_dma 317buf_flip_dma(struct buf *bp) 318{ 319 KASSERT(ISSET(bp->b_flags, B_BC)); 320 KASSERT(ISSET(bp->b_flags, B_BUSY)); 321 if (!ISSET(bp->b_flags, B_DMA)) { 322 KASSERT(bp->cache > DMA_CACHE); 323 KASSERT(bp->cache < NUM_CACHES); 324 /* XXX does not flip buffer for now */ Cheers, Constantine.