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 C3E39C46467 for ; Mon, 16 Jan 2023 04:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbjAPEiL (ORCPT ); Sun, 15 Jan 2023 23:38:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231686AbjAPEiE (ORCPT ); Sun, 15 Jan 2023 23:38:04 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B893F72A9; Sun, 15 Jan 2023 20:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PDkdlvplykONDhtm6dJQ9N1joXtgLBKkIFPyp5U/kn4=; b=Rh9FRGbOBXc8wtDvk20k7DdbHW zvbTl0mBX2a7wrR+XeZaZwQwOzdDzgFpsqH3ENndlxsNKLtB+IHvkz9tF/p9VUEmHCsNwUtcNtTZB GeByJS4I+sWG7Ut9m0rzx/43/mbInl0Hv60JehkUYQfc5pPzb0Jf85bjHpcqhAVz3ht63rABKVcA+ b3OIsGBScxCafRSkOn+ACgfqnNh2jN+44l9ddqsArleNjsD9yt/jCHt1fHdKc+YoHwU5u+qwA/nhD Siqf8BcmzF+/GfP1mcjNO0himzCNRbIyK7fEYevlNjl21x8AU/HLfH0bKh4l9NjLt35yMflXTUaNU hUSqmaUw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHHFx-008QQF-WF; Mon, 16 Jan 2023 04:38:02 +0000 Date: Mon, 16 Jan 2023 04:38:01 +0000 From: Matthew Wilcox To: maobibo Cc: Hongchen Zhang , Andrew Morton , David Howells , Sedat Dilek , Alexander Viro , "Christian Brauner (Microsoft)" , Luis Chamberlain , Mauro Carvalho Chehab , Eric Dumazet , "Fabio M. De Francesco" , Christophe JAILLET , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] pipe: use __pipe_{lock,unlock} instead of spinlock Message-ID: References: <20230107012324.30698-1-zhanghongchen@loongson.cn> <9fcb3f80-cb55-9a72-0e74-03ace2408d21@loongson.cn> <4b140bd0-9b7f-50b5-9e3b-16d8afe52a50@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b140bd0-9b7f-50b5-9e3b-16d8afe52a50@loongson.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 16, 2023 at 11:16:13AM +0800, maobibo wrote: > Hongchen, > > I have a glance with this patch, it simply replaces with > spinlock_irqsave with mutex lock. There may be performance > improvement with two processes competing with pipe, however > for N processes, there will be complex context switches > and ipi interruptts. > > Can you find some cases with more than 2 processes competing > pipe, rather than only unixbench? What real applications have pipes with more than 1 writer & 1 reader? I'm OK with slowing down the weird cases if the common cases go faster.