nvme-cli | NVMe management command line interface | Command Line Interface library
kandi X-RAY | nvme-cli Summary
kandi X-RAY | nvme-cli Summary
NVMe management command line interface.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nvme-cli
nvme-cli Key Features
nvme-cli Examples and Code Snippets
Community Discussions
Trending Discussions on nvme-cli
QUESTION
I am working on a testing tool for nvme-cli(written in c and can run on linux).
I am interested in repeating a nvme command 'r' number of times with 't' number of threads.
The below code does the repeat of each command along with threading, but the issue here is the parallel execution time is very much high compared to serial execution.
The reason I found was
...ANSWER
Answered 2017-Nov-21 at 09:42You certainly can invoke system calls (listed in syscalls(2)) from different threads (otherwise it won't be possible to write programs which do IO on several threads, like most multi-threaded web servers do).
However, some ioctl
(or other weird system calls) may be blocking or take some long time (several seconds or tenths of seconds) to execute. For a good example, ejecting a CDROM tray is done by some ioctl
and it takes some visible time (perhaps half a second) to perform (because it is some mechanical action).
I guess that NVME being related to SSD technology, some operations are slow (because the hardware itself is slow). Your bottleneck could be the hardware itself, then any kind of parallelisation won't help. It could happen -I don't really know- that you might use the same ioctl
(on the same file descriptor) in several threads but that the kernel would serialize its processing.
When the kernel is doing some blocking or long-running ioctl
(or any other system call) it uses its scheduler to run other tasks (processes or threads) and do some locking. Then your process is in a D
state (see proc(5) and /proc/self/stat
or /proc/1234/stat
for process of pid 1234) and don't even handle signals (see signal(7)) which are postponed.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nvme-cli
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page