On Sat, 2004-05-01 at 12:47, Christoph Hellwig wrote:
> On Sat, May 01, 2004 at 12:24:16PM -0600, Craig Tierney wrote:
> > 1) Are the versions of xfs in 2.4.26 and 2.6.x mostly the same
> > (except for the change in kernel interface)? In particular
> > are there any differences in the pagebuf code?
>
> there's a bunch of differences, mostly in the handling of the worker
> threads and the I/O handling code.
>
> > 2) Are all memory allocations controlled through xfs_buf?
>
> No.
>
> > Not just the actual {v,k}mallocs (I grepped that to verify)
> > but any time a routine chooses to access a page, it is selected
> > through routines in xfs_buf?
>
> Everything dealing with xfs_buf_t (= mostly metadata, + O_DIRECT data
> I/O in 2.4) is handled by xfs_buf.
>
> > 3) Does pagebuf_get_pages get called multiple times while
> > the filesystem is active, or only at initialization?
>
> It's called once for each buffer allocated, which happens all the time.
>
> > 4) Would there be any reason (except performance) not to change
> > MAX_SLAB_SIZE to a smaller values (like 0), to test the behavior
> > when only kmalloc is used to allocation memory?
>
> vmalloc can't be done from inside a spinlock. Now that you mention
> it I think we should explicitly check for that in the kmem_alloc code
> instead of relying KM_NOSLEEP requests beeing small enough all the time..
>
> Counterquestion: Why do you care? :)
Thanks for the details.
I am trying to debug a problem with file corruption writing to my xfs
filesystem (over nfs) when the server is under heavy load (16+ clients
writing simultaneously to different directories). It does happen with
different versions under the 2.4 kernel. It doesn't happen wen ext2 or
jfs is used as the underlying filesystem. It does happen more often on
when faster servers are used, and the corruption is always page aligned
(starts at ADDR%4096==0, ends at ADDR%4096=4095).
Since the corruption is always page aligned, and it happens more often
on faster servers, I suspect there is some race condition or missed lock
were pages are selected for use.
I didn't completely understand the difference between v/kmalloc, but
if there is an issue with mvalloc timings, I figured I would remove all
vmallocs (because it is easy) to see if it changed anything.
Thanks,
CRaig
|