From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E144AC433EF for ; Fri, 6 May 2022 14:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442151AbiEFOWu (ORCPT ); Fri, 6 May 2022 10:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231933AbiEFOWo (ORCPT ); Fri, 6 May 2022 10:22:44 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D289E68F93 for ; Fri, 6 May 2022 07:19:01 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id n18so7578600plg.5 for ; Fri, 06 May 2022 07:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=accQPhvfmiVPCnKwN/hY47uLVNCNPpovQkDbWH1UEwg=; b=aH7yUmqD5X4ykrrVGRfBk4DNO4T60/XMN8rKenJoObEBazV5ls1eqC10Y1bNfC68k5 JG9za2jNfe9e4ASYfASUva3yplGfuHE5sRog/S3qE8Kmus9STW2yfYdPu9/4spDd1xBU MxEJ8hngBwW33vxZtVFEmWN7omp7ivfnKYLQVHmMxaWC+pj+Pvj8bIAH8PglFO563Oxx R7kvaO1fl1XC6rlIZPK7DGPs9i/afNhoBlhYUFKyBBupgMG0wonDirIpduCpy6zHaafT GkI+Ap1caWdeQDzxaHE6RwR8cUmn9y7U3/nEWULhNpwq9vU7eR4M0dS7mB9FcMmdAD4x 3+rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=accQPhvfmiVPCnKwN/hY47uLVNCNPpovQkDbWH1UEwg=; b=eiiMZuerwBAoNWTR4YtV+REBWc1GaVlG60EeH2eTRw9XJaSQSQhp8/CoNoj0aeQ3lH aY7SGJYIaht81mLwJvzLpPy9J9zCbPXxgQsmrW0mdMe4GBf5YpVyvpLo6qVTV6zeRprY Qo9NvzrOq2YPZBOJ6sYsLbKg7e17xYx0iKkmQmJjJQBoInPCN2NnNWGNq+6XszxjaWp9 RX6uDcHP5oDM/8i0uW3YC6U/gqD1fSLEhIEoD3Vn04NLiUaxqgpXlG50hOmG7T7jLur5 TcWr7NTjcWRZaC4OqkUqy/UfeylHzi74v52b3AFKF9x7zpQ8RQ7fYAU9lAlsR04fgrNJ X3ag== X-Gm-Message-State: AOAM530/ueBIwLnrv90OGzltdM05pa9RrZ2QeDnYskmehwGLGLo8ShsW KjlYM50+4puZO8POm2WZpTnOCizFBaFwww== X-Google-Smtp-Source: ABdhPJz5gul93CFq40i2+RgsWY+4sxcteyEwA3CJMkl6btcXC8rTR7O03Ius5LHBYbIyxGarxOG6Sw== X-Received: by 2002:a17:902:f64d:b0:14f:fb63:f1a with SMTP id m13-20020a170902f64d00b0014ffb630f1amr3807560plg.159.1651846741310; Fri, 06 May 2022 07:19:01 -0700 (PDT) Received: from [192.168.4.166] (cpe-72-132-29-68.dc.res.rr.com. [72.132.29.68]) by smtp.gmail.com with ESMTPSA id f4-20020a17090274c400b0015ea4173bd6sm1764099plt.195.2022.05.06.07.19.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 May 2022 07:19:00 -0700 (PDT) Message-ID: <5ce3d6c7-42f9-28c3-0800-4da399adaaea@kernel.dk> Date: Fri, 6 May 2022 08:18:59 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v2 0/5] fast poll multishot mode Content-Language: en-US To: Hao Xu , io-uring@vger.kernel.org Cc: Pavel Begunkov , linux-kernel@vger.kernel.org References: <20220506070102.26032-1-haoxu.linux@gmail.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/6/22 1:36 AM, Hao Xu wrote: > Hi All, > I actually had a question about the current poll code, from the code it > seems when we cancel a poll-like request, it will ignore the existing > events and just raise a -ECANCELED cqe though I haven't tested it. Is > this by design or am I missing something? That's by design, but honestly I don't think anyone considered the case where it's being canceled but has events already. For that case, I think we should follow the usual logic of only returning an error (canceled) if we don't have events, if we have events just return them. For multi-shot, obviously also terminate, but same logic there. Care to do a separate patch for that? -- Jens Axboe