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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no 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 CE12FC4338F for ; Mon, 2 Aug 2021 18:59:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B54B5610FC for ; Mon, 2 Aug 2021 18:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbhHBS7Q (ORCPT ); Mon, 2 Aug 2021 14:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbhHBS7O (ORCPT ); Mon, 2 Aug 2021 14:59:14 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8039C061760 for ; Mon, 2 Aug 2021 11:59:04 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id mz5-20020a17090b3785b0290176ecf64922so304934pjb.3 for ; Mon, 02 Aug 2021 11:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ohR8MWK5z6tQgaHzKRw4z/9ZmwZHAJlnfek7VuSAWHE=; b=L2XLjUI8HeOqDyYuw9UZPUofbh1myp7tASYZwPPGk1eYrihjC7WlcdMVrBDbf5o8yt TblwUbG7lhiV1NGwUK4evO3ikpN8AHycGh6Wff5qujpld8ERJrhT8+HYFxsUw2WCDuyG FcamSDP7RkvedijB0Eva2Q8J6DHoorwAZdpAk+QN2Vv3iBmpzelHklnasHrdDcTWeX5h dCCZ//wqNcJ5NFdMhXRj/F8h4p/bEqpI2bKFc9yAW8XdriJZMrrIRrHNfKe9bE38XZyv GNjcTLQyN0QBTIuKPjzv0Wg4a8XhWKdK0mKVfhCxY0A5GEQYwRe+WwoHJ6L7NN6BiRAs lDBQ== 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=ohR8MWK5z6tQgaHzKRw4z/9ZmwZHAJlnfek7VuSAWHE=; b=RfRj8n9eqwAhUUsiLn3E/LeXUL0TDY64r3zB0aUiIVQkSOUEEf5+yrEvhlUNEjiLmd VpnB7wA49hp3XQtgt/sbR4Q7FhX+WSZz3MmxN5N7j2hsYcQr80Y3gPWY3BB3DXhxfwLt P4sfZ7imjnK1tvf0KSSXggr4rniXuNDrAnQ36vuTF+EpZXXWqR8Im661WEXO0zjMwDca XPyaz07YhekzZBdZalqHpnZR1gwUr8SuOSHCl2/nkUuHwywGlnfNAik8dZ0PVSKCDUTV a2YXW8uM5VR4rV5MuWj2KjTWV+smOw2HKzyWeMVEzBYzDzGp6WhlctrYM3Iw68rCChw9 0LxA== X-Gm-Message-State: AOAM533sT9F6T15CviS3o4njT9mIRS5VusaRy5h+P9OIozvWkayD4xhb Ee/SLOO2XpuMsAQc+0F4VZU4Iw== X-Google-Smtp-Source: ABdhPJw0PZIQU+a+lKpgEKgrBypeszyyvsh48xyNukQdoijIoZro31ZDTgCwHQ9cjrxbem1kEDfS7g== X-Received: by 2002:a63:f145:: with SMTP id o5mr234562pgk.273.1627930744547; Mon, 02 Aug 2021 11:59:04 -0700 (PDT) Received: from sspatil2.c.googlers.com (190.40.105.34.bc.googleusercontent.com. [34.105.40.190]) by smtp.gmail.com with ESMTPSA id c14sm615337pjr.3.2021.08.02.11.59.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Aug 2021 11:59:04 -0700 (PDT) Subject: Re: [PATCH 1/1] fs: pipe: wakeup readers everytime new data written is to pipe To: Linus Torvalds Cc: linux-fsdevel , Linux Kernel Mailing List , David Howells , Greg Kroah-Hartman , stable , Android Kernel Team References: <20210729222635.2937453-1-sspatil@android.com> <20210729222635.2937453-2-sspatil@android.com> From: Sandeep Patil Message-ID: Date: Mon, 2 Aug 2021 18:59:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/21 10:53 PM, Linus Torvalds wrote: > On Fri, Jul 30, 2021 at 12:23 PM Linus Torvalds > wrote: >> >> I'll mull it over a bit more, but whatever I'll do I'll do before rc4 >> and mark it for stable. > > Ok, I ended up committing the minimal possible change (and fixing up > the comment above it). > > It's very much *not* the original behavior either, but that original > behavior was truly insane ("wake up for each hunk written"), and I'm > trying to at least keep the kernel code from doing actively stupid > things. > > Since that old patch of mine worked for your test-case, then clearly > that realm-core library didn't rely on _that_ kind of insane internal > kernel implementation details exposed as semantics. So The minimal > patch basically says "each write() system call wil do at least one > wake-up, whether really necessary or not". > > I also intentionally kept the read side untouched, in that there > apparently still isn't a case that would need the confused semantics > for read events. > > End result: the commit message is a lot bigger than the patch, with > most of it being trying to explain the background. > > I've pushed it out as commit 3a34b13a88ca ("pipe: make pipe writes > always wake up readers"). Holler if you notice anything odd remaining. Since what you merged isn't different than what I tested, I don't expect any surprises but I will test it regardless. I will come back if I see anything unexpected. Thanks for the explanation about the default behavior earlier in the thread. - ssp