diff options
author | 2019-11-08 08:52:53 -0700 | |
---|---|---|
committer | 2019-11-11 16:32:55 -0700 | |
commit | 0ddf92e848ab7abf216f218ee363eb9b9650e98f (patch) | |
tree | 795723a6285d9b89eb38d46298acf77d6fd8f8e0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | io_uring: convert accept4() -ERESTARTSYS into -EINTR (diff) | |
download | linux-dev-0ddf92e848ab7abf216f218ee363eb9b9650e98f.tar.xz linux-dev-0ddf92e848ab7abf216f218ee363eb9b9650e98f.zip |
io_uring: provide fallback request for OOM situations
One thing that really sucks for userspace APIs is if the kernel passes
back -ENOMEM/-EAGAIN for resource shortages. The application really has
no idea of what to do in those cases. Should it try and reap
completions? Probably a good idea. Will it solve the issue? Who knows.
This patch adds a simple fallback mechanism if we fail to allocate
memory for a request. If we fail allocating memory from the slab for a
request, we punt to a pre-allocated request. There's just one of these
per io_ring_ctx, but the important part is if we ever return -EBUSY to
the application, the applications knows that it can wait for events and
make forward progress when events have completed. This is the important
part.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions