Message ID | 20181206164122.2166-2-snitzer@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Mike Snitzer |
Headers | show
Return-Path: <dm-devel-bounces@redhat.com> 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 C1CC114E2 for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 6 Dec 2018 16:42:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF8E92F0DC for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 6 Dec 2018 16:42:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADC322F14D; Thu, 6 Dec 2018 16:42:02 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FEA72F0DE for <patchwork-dm-devel@patchwork.kernel.org>; Thu, 6 Dec 2018 16:42:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2AD9A1F6A; Thu, 6 Dec 2018 16:42:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2083226E8; Thu, 6 Dec 2018 16:42:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 594FA3F7CD; Thu, 6 Dec 2018 16:42:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wB6GfUw5030127 for <dm-devel@listman.util.phx.redhat.com>; Thu, 6 Dec 2018 11:41:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4D70A3782; Thu, 6 Dec 2018 16:41:30 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E4CC662D1; Thu, 6 Dec 2018 16:41:29 +0000 (UTC) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0757330014B1; Thu, 6 Dec 2018 16:41:29 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id r14so1245400qtp.1; Thu, 06 Dec 2018 08:41:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=VS4iuAD6sE8maCiA4jBHJmimohyGnKGLtLR2nbbQu/g=; b=TbSEz4BgTiPstcqTMLG9oDGKXzhfwvHm6sWD7VyVQEjLqNNlJRmhbDd6htvJXV+JVe Iu5TEoTJSjjk8d7YR2Dfk5Uy+tL99kFaYPgRETp323IVm3FGWbgom4ZV9R5Swxt9zRS/ dGZ8+15zYZXLE9ECUsNwVo9QBCThG36mZXBuzBGycMABvrEJCjR3oro9+14Ter79+qBj r8vEjCN1EaB52EzTLMhO8azQBsTmgjDHuG+oXzgOzd3GwO+SHSNl/JTaNbgF3Xw/elwk 7GSgmHD8tf7LLF6b75zfIDlKwoeeoGZn1nNR8J5cQGkWtxvB79y9HHbUoWE2+bUXd6ai bA9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=VS4iuAD6sE8maCiA4jBHJmimohyGnKGLtLR2nbbQu/g=; b=p2dm696AQoRqkNa76ppwWOGComkSrTxlicAC/jl64Itl2P3J4uin0gSiHM8FD2lTTs Ota6/h5G0d5hSEurxk9WBvEcUxAaqAdNkHiiGMV0mpllN8KShMD7T+DaKdQFDlRB+o64 u4IWYPJlllQgOjZ81a7e1BWxJg2jBzAX7Td89n2sZ0wzpRwbelYcKV/6xMgz7xCfy7PM XFUfd1MIEViAN2awKisWZdcwfd2axZ20Hic3HqxmgWIVVtAJRacGmnddYJ7bsS2DuE+x Z1dW3pF6HI6CyRC3E6Gu8u8NvjOTBuHa+axfmObpKwgEhkrddff62e/HdiNpnw38qdKD GpJQ== X-Gm-Message-State: AA+aEWYobkE4bRpcVoyr70kj1pdVvDHln3ODGUKtvIFk6+XGjXBLPGHu T9iNkBt+xtEV6VsdcNf4Az+jqMIR X-Google-Smtp-Source: AFSGD/U7OJtFzzyUJYyYgohoXBmchJhF9ty6DRKXPvOs7nbzkiDXBDMJrKu+1GUSlk7NGtAanpCnmw== X-Received: by 2002:ac8:3a64:: with SMTP id w91mr28264753qte.70.1544114488189; Thu, 06 Dec 2018 08:41:28 -0800 (PST) Received: from localhost (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id y2sm585898qtb.88.2018.12.06.08.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 08:41:27 -0800 (PST) From: Mike Snitzer <snitzer@redhat.com> To: Jens Axboe <axboe@kernel.dk> Date: Thu, 6 Dec 2018 11:41:16 -0500 Message-Id: <20181206164122.2166-2-snitzer@redhat.com> In-Reply-To: <20181206164122.2166-1-snitzer@redhat.com> References: <20181206164122.2166-1-snitzer@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 06 Dec 2018 16:41:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 06 Dec 2018 16:41:29 +0000 (UTC) for IP:'209.85.160.196' DOMAIN:'mail-qt1-f196.google.com' HELO:'mail-qt1-f196.google.com' FROM:'snitzer@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.072 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.196 mail-qt1-f196.google.com 209.85.160.196 mail-qt1-f196.google.com <snitzer@gmail.com> X-RedHat-Possible-Forgery: <snitzer@gmail.com> Mike Snitzer <snitzer@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: linux-block@vger.kernel.org, dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com> Subject: [dm-devel] [PATCH v4 1/7] dm: dont rewrite dm_disk(md)->part0.in_flight X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development <dm-devel.redhat.com> List-Unsubscribe: <https://www.redhat.com/mailman/options/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=unsubscribe> List-Archive: <https://www.redhat.com/archives/dm-devel> List-Post: <mailto:dm-devel@redhat.com> List-Help: <mailto:dm-devel-request@redhat.com?subject=help> List-Subscribe: <https://www.redhat.com/mailman/listinfo/dm-devel>, <mailto:dm-devel-request@redhat.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 06 Dec 2018 16:42:01 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
per-cpu in_flight counters for bio-based drivers
|
expand
|
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index a733e4c920af..a8ae7931bce7 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -663,8 +663,7 @@ static void start_io_acct(struct dm_io *io) generic_start_io_acct(md->queue, bio_op(bio), bio_sectors(bio), &dm_disk(md)->part0); - atomic_set(&dm_disk(md)->part0.in_flight[rw], - atomic_inc_return(&md->pending[rw])); + atomic_inc(&md->pending[rw]); if (unlikely(dm_stats_used(&md->stats))) dm_stats_account_io(&md->stats, bio_data_dir(bio), @@ -693,7 +692,6 @@ static void end_io_acct(struct dm_io *io) * a flush. */ pending = atomic_dec_return(&md->pending[rw]); - atomic_set(&dm_disk(md)->part0.in_flight[rw], pending); pending += atomic_read(&md->pending[rw^0x1]); /* nudge anyone waiting on suspend queue */