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 X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BBD5C433DF for ; Sun, 16 Aug 2020 22:17:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 045F22078D for ; Sun, 16 Aug 2020 22:17:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="FOoHa43t" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729427AbgHPWRb (ORCPT ); Sun, 16 Aug 2020 18:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbgHPWRb (ORCPT ); Sun, 16 Aug 2020 18:17:31 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFD32C061786 for ; Sun, 16 Aug 2020 15:17:30 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id g7so5407293plq.1 for ; Sun, 16 Aug 2020 15:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0PIjtU76QMFymGa/Gzz2lsam6AFoot0XwLF7rVK2HiA=; b=FOoHa43tZ9t6D+xXyQKFHUeEJI3gIAsYkoTZCHCIKMBy5orgHoJCzlSxTsNJJxRYki 9OkQlOvPJ6cQRKcrOxkRSTVdpiN1xI3yWwVcQhPx+fo2H+vW4zu2EfwnBUBmBgnf60G1 JamPqarto70A8jDs0wW1JtFNIDJJPVsHCIuwjx0WpJKCz9NlQM4uWpZ93+KGUx+Jkpao iRn9adYJ+AHUN7n5WGvAo4W8a4aZtmBPcS+IaPBg4Aqto0aspHwm1q7IswpaDrnkCne7 1ZAWZ+1UeKY0lKPG1zTNGEcQojwivsXu0Xho6S7xYpVd1Uj+Em1INCyw3fVpm9gyj+s5 wawg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0PIjtU76QMFymGa/Gzz2lsam6AFoot0XwLF7rVK2HiA=; b=uIcLZhnikKG70Poi/DHkPovKfuKiMh6YE6BUphSPQ9lp3rJl4N4BEcM1yHw7lItSJN Yi/iKly6JTElANVN1Mtq3e5P9Za6uIZXWCsk2VLkpZl8poPpkO/urpy+kGtgQWjGUbCu y/8utItl3x6paD9PHeThYW87s39+ynBKBIEm9aYdtEorBiYwPHMVknZ+3VwnBrj9ph0n /e55/ot+WH8vgJhuSyZZryVuaQ1nFgon0sVw1ZzQTJo6bZio4pJokccNmLQMtpM+u7j9 P4OZKixQZ2DPaPccjAwK4ZOLkiZIHq9kUMq6ArRxtb2N7qd0/wZIqHEzYcBLfY69JvZW LNWQ== X-Gm-Message-State: AOAM532blOur37HImVhq8qzS9bnGXdEVSmOeVSFHJPeCEBYh44Pn4nop BshyK50HaYzstS36kXMqqSJ+Bg== X-Google-Smtp-Source: ABdhPJyl0J/UuszAym7nxsQ1ewZbUQ3S/M3jEK5TRL+JBtQZ7WIptObSWaM+b/9hUEjxpdfrozxYGQ== X-Received: by 2002:a17:90b:391:: with SMTP id ga17mr10110495pjb.75.1597616250380; Sun, 16 Aug 2020 15:17:30 -0700 (PDT) Received: from ?IPv6:2605:e000:100e:8c61:ea1b:63b0:364:3a3b? ([2605:e000:100e:8c61:ea1b:63b0:364:3a3b]) by smtp.gmail.com with ESMTPSA id f195sm15767278pfa.96.2020.08.16.15.17.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Aug 2020 15:17:29 -0700 (PDT) Subject: Re: io_uring process termination/killing is not working To: Josef , io-uring@vger.kernel.org, Pavel Begunkov Cc: norman@apache.org References: <8e734ada-7f28-22df-5f30-027aca3695d1@gmail.com> <5fa9e01f-137d-b0f8-211a-975c7ed56419@gmail.com> <63024e23-2b71-937a-6759-17916743c16c@gmail.com> <904b4d74-09ec-0bd3-030a-59b09fb1a7da@kernel.dk> <390e6d95-040b-404e-58c4-d633d6d0041d@kernel.dk> <63b47134-ad9c-4305-3a19-8c5deb7da686@kernel.dk> <689aa6e9-bfff-3353-fc09-d8dec49485bd@kernel.dk> From: Jens Axboe Message-ID: Date: Sun, 16 Aug 2020 15:17:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 8/16/20 2:09 PM, Josef wrote: >> BTW, something I think you're aware of, but wanted to bring up >> explicitly - if IORING_FEAT_FAST_POLL is available in the ring features, >> then you generally don't want/need to link potentially blocking requests >> on pollable files with a poll in front. io_uring will do this >> internally, and save you an sqe and completion event for each of these >> types of requests. >> >> Your test case is a perfect example of that, neither the accept nor the >> socket read would need a poll linked in front of them, as they are both >> pollable file types and will not trigger use of an async thread to wait >> for the event. Instead an internal poll is armed which will trigger the >> issue of that request, when the socket is ready. > > I agree as well I don't need a poll linked in font of read event, but > not for the non blocking accept event because of this fix in Linux > 5.8: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.8&id=e697deed834de15d2322d0619d51893022c90ea2 > I receive an immediate response to tell if there's ever any data > there, same behaviour like accept non blocking socket, that’s why I > use poll link to avoid that Gotcha, yes for that case it can be useful. -- Jens Axboe