[Top] [All Lists]

Re: separate log and structure from user data device?

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: separate log and structure from user data device?
From: Jan Wagner <jwagner@xxxxxxxxxxx>
Date: Wed, 7 Jun 2006 14:05:57 +0300 (EEST)
Cc: Keith Owens <kaos@xxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20060606101258.B644608@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0606051402410.18047@xxxxxxxxxxx> <8630.1149517148@xxxxxxxxxxxxxxx> <20060606101258.B644608@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
On Tue, 6 Jun 2006, Nathan Scott wrote:
> > Of course that requires a change to the VFS layer to pass a flag saying
> > "this data is critical", plus support in the I/O path for setting HSE.
> Its a trivial thing from the filesystem POV - in XFS, it would
> require a change in fs/xfs/linux-2.6/xfs_buf.c - the call into
> submit_bio() there is the point all metadata and log IO gets
> funnelled through, and file data doesn't travel that path. So,
> if the drivers/block layer supported a bio flag to say "this is
> critical", it should be a one-line XFS change to support that I
> would think.

(Short-lived discussion/probing at http://lkml.org/lkml/2006/5/18/261)

Don't know what a bio flag is but it sounds good :), like some ioctl()
command to tag the block device into critical / noncritical mode.

Or since not in the kernel yet, maybe incorporate the ATA commands (HD
internal flag on/off) for enabling Streaming into the xfs realtime data
code sections, while taking care to switch Streaming back off when
accessing other fs partition / xfs subvolume on same drive (quite a hack,
I guess...). Oh well.

Other question, is the below really the correct way to enable realtime for
a new file?

/* O_DIRECT for "realtime" */
int fid;
assert( (fid = open(pn, O_WRONLY|O_CREAT|O_DIRECT|O_SYNC|O_LARGEFILE)) != -1 );
// ------------------- XFS realtime
struct fsxattr fsxinfo;
if (ioctl(fid, XFS_IOC_FSGETXATTR, &fsxinfo) == -1) {
   perror("fsgetxattr failed");
} else {
   fsxinfo.fsx_xflags = XFS_XFLAG_REALTIME;
   if (ioctl(fid, XFS_IOC_FSSETXATTR, &fsxinfo) == -1) {
      perror("setxattr ioctl failed");
//... write to file created file
assert( (close(fid) != -1) );

I'm getting only about 500mbits/s write speed into the file (continuously
writing 1024 byte or much larger chunks) with the above code on XFS with
the rtdev on a RAID0 /dev/md0 and "actual" XFS on /dev/hda6. With XFS
directly on /dev/md0 and no realtime section but logdev=/dev/hda6,
throughput is a nice ~2.5gbits/s.

Hence not sure if the above code is correct? (but maybe rt support in the
linux 2.6.16 kernel really is /this/ "experimental" ;-)...

 - Jan

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