io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Lu Hongfei <luhongfei@vivo.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] io_uring: A new function has been defined to make get/put exist in pairs
Date: Thu, 6 Jul 2023 08:05:33 -0600	[thread overview]
Message-ID: <cf70cba0-3ba2-3907-542d-c80216068f7b@kernel.dk> (raw)
In-Reply-To: <20230706093208.6072-1-luhongfei@vivo.com>

On 7/6/23 3:32?AM, Lu Hongfei wrote:
> A new function called io_put_task_refs has been defined for pairing
> with io_get_task_refs.
> 
> In io_submit_sqes(), when req is not fully sent(i.e. left != 0), it is
> necessary to call the io_put_task_refs() to recover the current process's
> cached_refs and pair it with the io_get_task_refs(), which is easy to
> understand and looks more regular.

No point having a helper for just a single caller.

-- 
Jens Axboe


      reply	other threads:[~2023-07-06 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  9:32 [PATCH] io_uring: A new function has been defined to make get/put exist in pairs Lu Hongfei
2023-07-06 14:05 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf70cba0-3ba2-3907-542d-c80216068f7b@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luhongfei@vivo.com \
    --cc=opensource.kernel@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).