forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wire up some more capabilities of ioctl(SG_SET_GET_EXTENDED). One is the size of each internal scatter gather list element. This defaults to 2^15 and was fixed in previous versions of this driver. If the user provides a value, it must be a power of 2 (bytes) and no less than PAGE_SIZE. sum_fd_dlens provides user control over a mechanism designed to stop the starvation of the host machine's memory. Since requests per file descriptor are no longer limited to 16, thousands could be queued up by a badly designed program. If each one requests a large buffer (say 128 KB each for READs) then without this mechanism, the OOM killer may be called on to save the machine. The driver counts the cumulative size of data buffers outstanding held by each file descriptor. Once that figure exceeds a default size of 16 MB, further submissions on that file descriptor are failed with E2BIG. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
- Loading branch information
1 parent
af4e0ea
commit ecbddf3
Showing
2 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters