Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2937380pxb; Tue, 24 Aug 2021 11:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjq/gfGPNHD5i/1jfFxX9r2U+pv8QAwFyIsphfKUH8sw96cfnktvCK2PWlHDj/1Ifh7SQF X-Received: by 2002:a5e:dc02:: with SMTP id b2mr31347092iok.197.1629828000807; Tue, 24 Aug 2021 11:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629828000; cv=none; d=google.com; s=arc-20160816; b=kbfWC6x67vd1DiyFLFMsfW3l/6hl+p6n9nzgGpS3JZicsjPBkh8OFLXyGCpZLfu5qd eNgTrMrv/VaaTA9Q/S9zvC+x4Fc8kKwcOn7floDxabLayYPCWlCodc4hdeUGF3bjJgZJ h2+ytWlBjXQ8enwrko5Sj6z4y+F3ObXnXxwuAepnSs1kv2YctzhZavVABcD7tKrWM790 sb5ZVM+C66bCJzc3mvtbRagma/0JIfpLL0zoYjRn6POOJJavKe06j0EnT0jyWR9XBIa3 sVzSdk8vBQfBcwSFhnoprAd95heZyoSKOMu0jCaZ70WsM7b09OFGMVLHA6VjzbWq/aw1 oGjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=s+/lXLW+84+cEx++etuMHYzjE555zjCwFj9ti+8XnFM=; b=o3O2d5RmcgcDfkdURw6/36y5LOPyYTARtdMcLr3wDsinKTNJu+tsaoWq8bs2BFAoY/ kdYVVgcglWI3TEACQoYf5Bak1Ms/picWd55rvICNAhePQD8ZKqZ5jA0QXaP4LsiHF5Ol EADNGKXkTeoSAsX9aJfkAi3K/WtFK52X9EFId4Ye/aKto7vyDswIWOJo8dqJxyKFGYW/ C1VvhvSGe/7chGxYW9uEOt/D/ElXCgT/Ey9ISBcFFM8yADidEpCLcXWehn5KuAngiyoI e2+Zt1i5OXDn2pnno7JxQ7I1ODOjRwLqOf4BXN2eUSvZ1AkzXQOedbKO8nwcyBH5Lx1V dJKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DYuypqUt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si18759781ilv.57.2021.08.24.10.59.48; Tue, 24 Aug 2021 11:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DYuypqUt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240751AbhHXR7u (ORCPT + 99 others); Tue, 24 Aug 2021 13:59:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240657AbhHXR7s (ORCPT ); Tue, 24 Aug 2021 13:59:48 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A43BC0E064E for ; Tue, 24 Aug 2021 10:39:45 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id d16so39015193ljq.4 for ; Tue, 24 Aug 2021 10:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s+/lXLW+84+cEx++etuMHYzjE555zjCwFj9ti+8XnFM=; b=DYuypqUtCTHwP1gqnv1cHe73NDXkrWWzprn+z3WkSF/xMLGndxcx5sQAqfuw85Hq69 brpoCeGUw0o2oW/bLZ4Tpnnhv0LqQeJthBqAQtcUtbCGiEv/ToxXF3JDSle3ocjJMAEC gQ7y9C32QFTtR4Tb6IlJuBdWDO4rMoUkKcSXg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s+/lXLW+84+cEx++etuMHYzjE555zjCwFj9ti+8XnFM=; b=ohBn/5Ps601XhvSOrQxS5NWxJ2uy0RNHmY/mhS40FjmLZ2aaPEIOFQBqAtL52h3u9b TiTGOTThbowXIuDugWVVhaTtDURBU0RNkZNZdTqOC9YE2mrcj2jwQBffpxZDOkI8lrfW pAuzyiAX4DK6oJB8eBFc37MLHlx/B6h0QcmF5Mbw+m8u4X+8yLamTLWpVEFRJb+/VUbl jaUdYVIyZEFe3iJRNgH1E4QmgTcEGO6s7vLaVdVKBX/UktDYt+yWjphdD08Y1jov4R9u 1gq5sTRcdeNo2HMTxemqok5L5I1HewJZxXmlt738e7Fi0Hi37JIDVRv0LCu9UwfEYuc4 YZwg== X-Gm-Message-State: AOAM531ikAg6XtCuMg0t3hjHwCd+S3yEinRN+tPioAPxhyMnJ33cs0Ha MiLwmNfzkdOiM5DjU/AAtUpeMInGejQOplcg X-Received: by 2002:a2e:7d0e:: with SMTP id y14mr32636097ljc.251.1629826783426; Tue, 24 Aug 2021 10:39:43 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id z7sm1807573lft.302.2021.08.24.10.39.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Aug 2021 10:39:41 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id p15so1172261ljn.3 for ; Tue, 24 Aug 2021 10:39:41 -0700 (PDT) X-Received: by 2002:a2e:8808:: with SMTP id x8mr33404195ljh.220.1629826781193; Tue, 24 Aug 2021 10:39:41 -0700 (PDT) MIME-Version: 1.0 References: <20210824151337.GC27667@xsang-OptiPlex-9020> In-Reply-To: From: Linus Torvalds Date: Tue, 24 Aug 2021 10:39:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [pipe] 3b844826b6: stress-ng.sigio.ops_per_sec -99.3% regression To: kernel test robot , Colin Ian King Cc: Sandeep Patil , Mel Gorman , LKML , lkp@lists.01.org, kernel test robot , "Huang, Ying" , Feng Tang , Zhengjun Xing Content-Type: multipart/mixed; boundary="00000000000056e19405ca519ebf" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000056e19405ca519ebf Content-Type: text/plain; charset="UTF-8" On Tue, Aug 24, 2021 at 10:32 AM Linus Torvalds wrote: > > We could do the same ugly thing for FASYNC that we do for EPOLLET - > make it always fasync on new data, exactly because the previous SIGIO > might not have emptied the buffer completely. The patch would be something like the attached (UNTESTED!) Linus --00000000000056e19405ca519ebf Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ksqcrs750 IGZzL3BpcGUuYyB8IDIwICsrKysrKysrLS0tLS0tLS0tLS0tCiAxIGZpbGUgY2hhbmdlZCwgOCBp bnNlcnRpb25zKCspLCAxMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9mcy9waXBlLmMgYi9m cy9waXBlLmMKaW5kZXggNjc4ZGVlMmE4MjI4Li42ZDQzNDJiYWQ5ZjEgMTAwNjQ0Ci0tLSBhL2Zz L3BpcGUuYworKysgYi9mcy9waXBlLmMKQEAgLTM2MywxMCArMzYzLDkgQEAgcGlwZV9yZWFkKHN0 cnVjdCBraW9jYiAqaW9jYiwgc3RydWN0IGlvdl9pdGVyICp0bykKIAkJICogX3ZlcnlfIHVubGlr Z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