… | |
… | |
277 | IO::AIO::idle_timeout $seconds |
277 | IO::AIO::idle_timeout $seconds |
278 | IO::AIO::max_outstanding $maxreqs |
278 | IO::AIO::max_outstanding $maxreqs |
279 | IO::AIO::nreqs |
279 | IO::AIO::nreqs |
280 | IO::AIO::nready |
280 | IO::AIO::nready |
281 | IO::AIO::npending |
281 | IO::AIO::npending |
|
|
282 | $nfd = IO::AIO::get_fdlimit [EXPERIMENTAL] |
282 | IO::AIO::min_fdlimit $nfd; |
283 | IO::AIO::min_fdlimit $nfd [EXPERIMENTAL] |
283 | |
284 | |
284 | IO::AIO::sendfile $ofh, $ifh, $offset, $count |
285 | IO::AIO::sendfile $ofh, $ifh, $offset, $count |
285 | IO::AIO::fadvise $fh, $offset, $len, $advice |
286 | IO::AIO::fadvise $fh, $offset, $len, $advice |
286 | IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]] |
287 | IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]] |
287 | IO::AIO::munmap $scalar |
288 | IO::AIO::munmap $scalar |
… | |
… | |
1079 | Scans a directory (similar to C<aio_readdir>) but additionally tries to |
1080 | Scans a directory (similar to C<aio_readdir>) but additionally tries to |
1080 | efficiently separate the entries of directory C<$path> into two sets of |
1081 | efficiently separate the entries of directory C<$path> into two sets of |
1081 | names, directories you can recurse into (directories), and ones you cannot |
1082 | names, directories you can recurse into (directories), and ones you cannot |
1082 | recurse into (everything else, including symlinks to directories). |
1083 | recurse into (everything else, including symlinks to directories). |
1083 | |
1084 | |
1084 | C<aio_scandir> is a composite request that creates of many sub requests_ |
1085 | C<aio_scandir> is a composite request that generates many sub requests. |
1085 | C<$maxreq> specifies the maximum number of outstanding aio requests that |
1086 | C<$maxreq> specifies the maximum number of outstanding aio requests that |
1086 | this function generates. If it is C<< <= 0 >>, then a suitable default |
1087 | this function generates. If it is C<< <= 0 >>, then a suitable default |
1087 | will be chosen (currently 4). |
1088 | will be chosen (currently 4). |
1088 | |
1089 | |
1089 | On error, the callback is called without arguments, otherwise it receives |
1090 | On error, the callback is called without arguments, otherwise it receives |
… | |
… | |
1482 | C<IO::AIO::FIEMAP_EXTENT_DATA_ENCRYPTED>, C<IO::AIO::FIEMAP_EXTENT_NOT_ALIGNED>, |
1483 | C<IO::AIO::FIEMAP_EXTENT_DATA_ENCRYPTED>, C<IO::AIO::FIEMAP_EXTENT_NOT_ALIGNED>, |
1483 | C<IO::AIO::FIEMAP_EXTENT_DATA_INLINE>, C<IO::AIO::FIEMAP_EXTENT_DATA_TAIL>, |
1484 | C<IO::AIO::FIEMAP_EXTENT_DATA_INLINE>, C<IO::AIO::FIEMAP_EXTENT_DATA_TAIL>, |
1484 | C<IO::AIO::FIEMAP_EXTENT_UNWRITTEN>, C<IO::AIO::FIEMAP_EXTENT_MERGED> or |
1485 | C<IO::AIO::FIEMAP_EXTENT_UNWRITTEN>, C<IO::AIO::FIEMAP_EXTENT_MERGED> or |
1485 | C<IO::AIO::FIEMAP_EXTENT_SHARED>. |
1486 | C<IO::AIO::FIEMAP_EXTENT_SHARED>. |
1486 | |
1487 | |
1487 | At the time of this writing (Linux 3.2), this requets is unreliable unless |
1488 | At the time of this writing (Linux 3.2), this request is unreliable unless |
1488 | C<$count> is C<undef>, as the kernel has all sorts of bugs preventing |
1489 | C<$count> is C<undef>, as the kernel has all sorts of bugs preventing |
1489 | it to return all extents of a range for files with large number of |
1490 | it to return all extents of a range for files with a large number of |
1490 | extents. The code works around all these issues if C<$count> is undef. |
1491 | extents. The code (only) works around all these issues if C<$count> is |
|
|
1492 | C<undef>. |
1491 | |
1493 | |
1492 | =item aio_group $callback->(...) |
1494 | =item aio_group $callback->(...) |
1493 | |
1495 | |
1494 | This is a very special aio request: Instead of doing something, it is a |
1496 | This is a very special aio request: Instead of doing something, it is a |
1495 | container for other aio requests, which is useful if you want to bundle |
1497 | container for other aio requests, which is useful if you want to bundle |
… | |
… | |
1608 | There are some caveats: when directories get renamed (or deleted), the |
1610 | There are some caveats: when directories get renamed (or deleted), the |
1609 | pathname string doesn't change, so will point to the new directory (or |
1611 | pathname string doesn't change, so will point to the new directory (or |
1610 | nowhere at all), while the directory fd, if available on the system, |
1612 | nowhere at all), while the directory fd, if available on the system, |
1611 | will still point to the original directory. Most functions accepting a |
1613 | will still point to the original directory. Most functions accepting a |
1612 | pathname will use the directory fd on newer systems, and the string on |
1614 | pathname will use the directory fd on newer systems, and the string on |
1613 | older systems. Some functions (such as realpath) will always rely on the |
1615 | older systems. Some functions (such as C<aio_realpath>) will always rely on |
1614 | string form of the pathname. |
1616 | the string form of the pathname. |
1615 | |
1617 | |
1616 | So this functionality is mainly useful to get some protection against |
1618 | So this functionality is mainly useful to get some protection against |
1617 | C<chdir>, to easily get an absolute path out of a relative path for future |
1619 | C<chdir>, to easily get an absolute path out of a relative path for future |
1618 | reference, and to speed up doing many operations in the same directory |
1620 | reference, and to speed up doing many operations in the same directory |
1619 | (e.g. when stat'ing all files in a directory). |
1621 | (e.g. when stat'ing all files in a directory). |
… | |
… | |
2069 | |
2071 | |
2070 | =over 4 |
2072 | =over 4 |
2071 | |
2073 | |
2072 | =item $numfd = IO::AIO::get_fdlimit |
2074 | =item $numfd = IO::AIO::get_fdlimit |
2073 | |
2075 | |
|
|
2076 | This function is I<EXPERIMENTAL> and subject to change. |
|
|
2077 | |
2074 | Tries to find the current file descriptor limit and returns it, or |
2078 | Tries to find the current file descriptor limit and returns it, or |
2075 | C<undef> and sets C<$!> in case of an error. The limit is one larger than |
2079 | C<undef> and sets C<$!> in case of an error. The limit is one larger than |
2076 | the highest valid file descriptor number. |
2080 | the highest valid file descriptor number. |
2077 | |
2081 | |
2078 | =item IO::AIO::min_fdlimit [$numfd] |
2082 | =item IO::AIO::min_fdlimit [$numfd] |
|
|
2083 | |
|
|
2084 | This function is I<EXPERIMENTAL> and subject to change. |
2079 | |
2085 | |
2080 | Try to increase the current file descriptor limit(s) to at least C<$numfd> |
2086 | Try to increase the current file descriptor limit(s) to at least C<$numfd> |
2081 | by changing the soft or hard file descriptor resource limit. If C<$numfd> |
2087 | by changing the soft or hard file descriptor resource limit. If C<$numfd> |
2082 | is missing, it will try to set a very high limit, although this is not |
2088 | is missing, it will try to set a very high limit, although this is not |
2083 | recommended when you know the actual minimum that you require. |
2089 | recommended when you know the actual minimum that you require. |
… | |
… | |
2085 | If the limit cannot be raised enough, the function makes a best-effort |
2091 | If the limit cannot be raised enough, the function makes a best-effort |
2086 | attempt to increase the limit as much as possible, using various |
2092 | attempt to increase the limit as much as possible, using various |
2087 | tricks, while still failing. You can query the resulting limit using |
2093 | tricks, while still failing. You can query the resulting limit using |
2088 | C<IO::AIO::get_fdlimit>. |
2094 | C<IO::AIO::get_fdlimit>. |
2089 | |
2095 | |
2090 | If an error occurs, returns C<undef> and sets C<$!>. |
2096 | If an error occurs, returns C<undef> and sets C<$!>, otherwise returns |
|
|
2097 | true. |
2091 | |
2098 | |
2092 | =item IO::AIO::sendfile $ofh, $ifh, $offset, $count |
2099 | =item IO::AIO::sendfile $ofh, $ifh, $offset, $count |
2093 | |
2100 | |
2094 | Calls the C<eio_sendfile_sync> function, which is like C<aio_sendfile>, |
2101 | Calls the C<eio_sendfile_sync> function, which is like C<aio_sendfile>, |
2095 | but is blocking (this makes most sense if you know the input data is |
2102 | but is blocking (this makes most sense if you know the input data is |