From patchwork Tue Nov 20 12:50:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 10690371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2C945A4 for ; Tue, 20 Nov 2018 12:51:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9355E2A730 for ; Tue, 20 Nov 2018 12:51:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 912992A31C; Tue, 20 Nov 2018 12:51:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44BEF2A730 for ; Tue, 20 Nov 2018 12:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728157AbeKTXUR (ORCPT ); Tue, 20 Nov 2018 18:20:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:44652 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727836AbeKTXUR (ORCPT ); Tue, 20 Nov 2018 18:20:17 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 97A20AF95 for ; Tue, 20 Nov 2018 12:51:17 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 6C0FCDA78B; Tue, 20 Nov 2018 13:50:56 +0100 (CET) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 0/4] Replace custom device-replace locking with rwsem Date: Tue, 20 Nov 2018 13:50:54 +0100 Message-Id: X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The first cleanup part went to 4.19, the actual switch from the custom locking to rswem was postponed as I found performance degradation. This turned out to be related to VM cache settings, so I'm resending the series again. The custom locking is based on rwlock protected reader/writer counters, waitqueues, which essentially is what the readwrite semaphore does. Previous patchset: https://lore.kernel.org/linux-btrfs/cover.1536331604.git.dsterba@suse.com/ Patches correspond to 8/11-11/11 and there's no change besides refreshing on top of current misc-next. David Sterba (4): btrfs: reada: reorder dev-replace locks before radix tree preload btrfs: dev-replace: swich locking to rw semaphore btrfs: dev-replace: remove custom read/write blocking scheme btrfs: dev-replace: open code trivial locking helpers fs/btrfs/ctree.h | 4 +- fs/btrfs/dev-replace.c | 97 ++++++++++++++---------------------------- fs/btrfs/dev-replace.h | 5 --- fs/btrfs/disk-io.c | 4 +- fs/btrfs/reada.c | 16 ++++--- fs/btrfs/scrub.c | 15 ++++--- fs/btrfs/volumes.c | 27 ++++++------ 7 files changed, 63 insertions(+), 105 deletions(-)