tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vectorized fsyncv(2) syscall -- useful?



readv(2)/writev(2) are the vectorized forms of read(2)/write(2).  They
exist to reduce the number of context switches required when dealing
with batches of IO.

I think that it would be both useful and trivial to add an fsyncv(2)
syscall to src/sys/kern/vfs_syscalls.c.  I'm thinking along the lines
of:

==

/* struct and prototype in unistd.h */
struct fsyncvec
{
        int fd;
        union
        {
                int errno; /* output */
                int how; /* input */
        } u;
        off_t start;
        off_t len;
};

/* return how many of the sv[] processed successfully */
int fsyncv(const struct fsyncvec *sv, int svcnt);

==

Indicate total success by returning svcnt.  [Also] indicate individual
sv[n] success by setting sv[n].u.errno equal to 0.

#define EOKAY 0 /* add this to sys/errno.h ? */

Agree?  Disagree?  "Patches welcome"?


Eddy
--
Everquick Internet - http://www.everquick.net/
A division of Brotsman & Dreger, Inc. - http://www.brotsman.com/
Bandwidth, consulting, e-commerce, hosting, and network building
Phone: +1 785 865 5885 Lawrence and [inter]national
Phone: +1 316 794 8922 Wichita
LinkedIn: http://www.linkedin.com/in/0xebd
________________________________________________________________________
DO NOT send mail to the following addresses:
davidc%brics.com@localhost -*- jfconmaapaq%intc.net@localhost -*- 
sam%everquick.net@localhost
Sending mail to spambait addresses is a great way to get blocked.
Ditto for broken OOO autoresponders and foolish AV software backscatter.


Home | Main Index | Thread Index | Old Index