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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT 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 1BFCAC04AAF for ; Tue, 21 May 2019 19:20:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5775217D7 for ; Tue, 21 May 2019 19:20:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ok7I7hBO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5775217D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o5vBcWhgdwB723el4mA2T0anz0byDpNV077oF/d3K4k=; b=Ok7I7hBOgbBO7r w7f+Fa/FC4cmVLYSVhbwSmwkaGOROKPqXxa89wPhldJFphXUzdDweh+gDrpJtw7M7plCc9btBKhu2 jKHbYdZl4J/yVJeCfhMPS9HFaD4Y3PNF89dy4hWZJ5uarzjvjbC1M0xA67A6bNJyI4TdpUgCnvT0B sAPcJhYzIK/AmRYpIb58QvaNgjlAIV1ZRgBf22cGxMKmArgjBUkoCgmfWFur9QcIBYb1g3M5vsd30 DDLJjE4F4Z/TMzZaHoWKcw+hyeP1gI9hTryOe28ww08Wt870FDLU9MpPzX3X8YiFVZSaQw1+phe35 aSawEa+Y6fxyRvrcPiNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTAJO-0002kB-U4; Tue, 21 May 2019 19:20:34 +0000 Received: from zeniv.linux.org.uk ([195.92.253.2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTAJM-0002jp-A5 for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 19:20:33 +0000 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hTAIz-0003v8-BX; Tue, 21 May 2019 19:20:09 +0000 Date: Tue, 21 May 2019 20:20:09 +0100 From: Al Viro To: David Howells Subject: Re: [PATCH 1/2] open: add close_range() Message-ID: <20190521192009.GK17978@ZenIV.linux.org.uk> References: <20190521150006.GJ17978@ZenIV.linux.org.uk> <20190521113448.20654-1-christian@brauner.io> <28114.1558456227@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <28114.1558456227@warthog.procyon.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190521_122032_351327_4F9F5819 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, oleg@redhat.com, linux-kselftest@vger.kernel.org, sparclinux@vger.kernel.org, shuah@kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, miklos@szeredi.hu, x86@kernel.org, torvalds@linux-foundation.org, Christian Brauner , linux-mips@vger.kernel.org, linux-xtensa@linux-xtensa.org, tkjos@android.com, arnd@arndb.de, jannh@google.com, linux-m68k@lists.linux-m68k.org, tglx@linutronix.de, ldv@altlinux.org, linux-arm-kernel@lists.infradead.org, fweimer@redhat.com, linux-parisc@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 21, 2019 at 05:30:27PM +0100, David Howells wrote: > If we can live with close_from(int first) rather than close_range(), then this > can perhaps be done a lot more efficiently by: > > new = alloc_fdtable(first); > spin_lock(&files->file_lock); > old = files_fdtable(files); > copy_fds(new, old, 0, first - 1); > rcu_assign_pointer(files->fdt, new); > spin_unlock(&files->file_lock); > clear_fds(old, 0, first - 1); > close_fdt_from(old, first); > kfree_rcu(old); I really hate to think how that would interact with POSIX locks... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel