Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30591544rwd; Thu, 6 Jul 2023 08:03:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHCgWEDv95NrzOH4GCqAKgziIWP2FVE0BCQNHZpFmbafhGXvmzEWrYTiguwKE7RBDh34Rc X-Received: by 2002:a17:90b:4d82:b0:262:f06d:c0fc with SMTP id oj2-20020a17090b4d8200b00262f06dc0fcmr2080812pjb.7.1688655787213; Thu, 06 Jul 2023 08:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688655787; cv=none; d=google.com; s=arc-20160816; b=qUrPiKPW/CW4mYO3oojAEXFCYc6yJZGXW9H8E0tKvwdpZAppnkxTTMuLGmNGMfh2qa LIieHMQWbTVLCYOIRKaUWzucjCJvhkuaixpHM9Q2c8E/clh1/rIhYTYN932aQA17YgI/ bCKmU4OQCBRF6C0XjRpdmTXUsCzdJc40EeGhA7XHRGOhcoUC+Mp0eNRrTirB+54/6/sO g3/AiTo4nD+2pLU4ld6bSEPkuC+82L9owoyuG/2zh5mXdrTY6J+WPPrRSmqHTvYwXAKP sUaXDIDx9haPmJVp1+2oBXZBn6dJSkPG9OxogsynNBmaiiE9PLPJLIDKrPuOHscb7fV9 tvCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=h5Hk27JWeoUUW7MPiiyKSEfcKWdx6NZyJMrzAcIyDls=; fh=m+D80QaAWUhRQu5athiH3EmOvJXxon+zV763+dBwl9o=; b=BH5k9bfemocFrAk0g8T998trm65LG+iTgc778AjuA2xlxNEemXCLnileCNdh+WxMRC N+PVC3z4VclzV2BnvBwmwXvdE1MEh2QsN+MmtQ6sxN4cu17WIKOjGG5YIKDWO+55PjXP djstPJQ9+3ZldOGyKabQtXZocTXMZf9m4ULyV0npifQ/SvNwjlHvcy0BHmhG4hNS73qw uIFeT66H2P2sNvduqj9qCURumKWlbFb3yYSOwR+Lnfs7ccgjrAXce0SJsvUhYm2qZGSe 4bSarKs/1cohUrTsomWWj/YE3XdW15hEVXTzXtmtkRbnmcY+TsyafW5x7yTffjngKYah 1OJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=F281iNWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ms18-20020a17090b235200b00262dc983a99si1633261pjb.91.2023.07.06.08.02.50; Thu, 06 Jul 2023 08:03:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=F281iNWr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232916AbjGFOFr (ORCPT + 99 others); Thu, 6 Jul 2023 10:05:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232895AbjGFOFp (ORCPT ); Thu, 6 Jul 2023 10:05:45 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 083ED1FF6 for ; Thu, 6 Jul 2023 07:05:35 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1a35f67d8efso136361fac.1 for ; Thu, 06 Jul 2023 07:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1688652335; x=1691244335; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=h5Hk27JWeoUUW7MPiiyKSEfcKWdx6NZyJMrzAcIyDls=; b=F281iNWr9Y97BH7qzddr6No9TtGRKPhfnJAPYnN6WK6jaw7YwjMdGPju296dqQKxsQ SDjXsd0/sFjaXFAbqR0ZCJjPFdcWuVFl2gat/pLa6oMG7vynCyYIbjN72ZnlgQYh2Vvq fr8UGum/50Vbm6ht9SA4zQS55kWX2bbBspRUT0faf65FRK5Yb19BLqjBtXiLCXYWubMb G4F39vJq6TMPdD5LNpShc531rhk3Di6+JzHzb9cfobs6ekHn+afUvoDpaYdhhgnl0a32 qcGDy7TNL8/QTaOIFiKr6TDlMOw1WVmPSiYZc5+YN81r/j2COIjiGNQ75qDFkgSXYmKm w0Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688652335; x=1691244335; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h5Hk27JWeoUUW7MPiiyKSEfcKWdx6NZyJMrzAcIyDls=; b=V8HxAYy1z3SarwT+wgkMPL+tIXrrKKw2FjSFHoSNmPWKf3ZmzqDluxwJE/c71uXobv 6IsG6eSMr7W2Rf/CbP/Y+Z/2W5tBX/PM4qZbPXny+FUU1CDHFIeyne+gJmNreBvThOu9 0FagxjqENEhlD/oRQWsNxeErObeE2J7miU4dIFBP4zK98EQQuFTh+Bx+7h3Kwnj0ChzL FxtkK0P6QpIMKeibXYcuvQNRavw7u4XMH3q7gt4nciP5hs4p2niWnrfO44dOUspPRLEE Qcha5RPPpNk3j3fs/kNUXTPDYU8s6R2yzQexIimkdbloaF02tsSexNQohsCTBE/KkTCM UzEA== X-Gm-Message-State: ABy/qLafg/Q4EfLQzX1IkPYiibznMH+o5VXfklaNAsLZW5m1e/5bb40w kNZP7CNDesd7vabc9e/MCy4Hng== X-Received: by 2002:a05:6870:c094:b0:192:6fce:d3be with SMTP id c20-20020a056870c09400b001926fced3bemr2226347oad.1.1688652335162; Thu, 06 Jul 2023 07:05:35 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 22-20020a17090a199600b00263ba6a248bsm3440900pji.1.2023.07.06.07.05.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jul 2023 07:05:34 -0700 (PDT) Message-ID: Date: Thu, 6 Jul 2023 08:05:33 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] io_uring: A new function has been defined to make get/put exist in pairs Content-Language: en-US To: Lu Hongfei , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com References: <20230706093208.6072-1-luhongfei@vivo.com> From: Jens Axboe In-Reply-To: <20230706093208.6072-1-luhongfei@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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