Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp627920ybl; Fri, 16 Aug 2019 01:13:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwD5yDhG55MuGO7yNe/hUs2MuperStvygYn4BqOmwHl2+fuPtRyNscEn1xXOFGoUiWwbVm X-Received: by 2002:a17:90a:3ad0:: with SMTP id b74mr5908101pjc.79.1565943222708; Fri, 16 Aug 2019 01:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565943222; cv=none; d=google.com; s=arc-20160816; b=E03W9B4QoCTU31mnmbsi/HhmV+0YzuOk6URuFU6J0BRZuwj68U2/h70U55PoIiUGu0 OmbyrnYeCtOmi3VHlqNchVsC3eri8XWeLeayDyEHP6CFzfEo6qfpsu7TG/M0sH8T+OuM O+MRb8oSV6ILfm+RzfrhzMtn/QLYwIgo/Vr1unRvAOmO1yuRDOkQxWtwNcWTp3vAjJLq HV7MR2PIpf37ulBtELg3GiQX/h9v3LFhhf7VVded+Y1s8GhL3FYULYNqjVsTfLpE3Rec n7RauLj44extOTScsaepkxCbVg5iqhhGZrzPPDy6PbX0CoFj2YeJZDiGu0rSi7mL+gwv nEjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MS61GMgEvdHYUsX/D1TRCCawW8p8Qqopt15uSqVsXJY=; b=wFbMwbbDoyfuw1+5wfjWQwXKjXuPFbuiWBo7RZxiq3ZmfHo16mrWe/loalAdUy9Z1V E9fvezCWQYVO0o28y9CCN517qjRkhP2gEYdEA6ajwxBobEwEja9vThMMQci2tJVEUBeL lzlkckMZeWtlYd+LE5O7ZZjujc/RUUTWoxUIhdAgeGMIyV4/7wbJqwfbmTmA+lN7n9JX 1taYCRvE754WiGY+Ofk6oDATuX3Ij8GJzK5PKXg2/tl9KBqMTCGZcnwBoOc0o5qdGrji 2gFYH015RNRpvb7lpVKkQbsZF9lIys50xnzUF4OK8IeNPHt5LqLfWKiLX/G34Pmv/Ir1 mCbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=Y0WaWiAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si3325006pgc.75.2019.08.16.01.13.25; Fri, 16 Aug 2019 01:13:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=Y0WaWiAs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbfHPIK6 (ORCPT + 99 others); Fri, 16 Aug 2019 04:10:58 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46551 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfHPIK4 (ORCPT ); Fri, 16 Aug 2019 04:10:56 -0400 Received: by mail-wr1-f68.google.com with SMTP id z1so679586wru.13 for ; Fri, 16 Aug 2019 01:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MS61GMgEvdHYUsX/D1TRCCawW8p8Qqopt15uSqVsXJY=; b=Y0WaWiAsWj46fzLNk/Pk0gg1cBEpKiTtG9ViFT+7Egli+OeoljqrIP2l00vNM64iHo N6F3+VxxeK3ilnbUrBoUj5t4ZOPkUtcxGtBbGUq48YlLWIUtumboc8S/DQw9tMFIa6ZN IiYMgeMsDdVAvOxwFYwMlkwivyiCtw5gZSEE6Trpuqq2JHCHldvD8yF0DFkiEfboJSqb 6mf8wA34wB0R0oMrWzPHIEGkVTQQ2secG6Lnll1IomQRQTrUvacMAdWQFqglRF93HmQP Ex3HBc8K1O+05TmmMWjdfeufc4NoUCBcFl1GvxLxxPL4WjLVy3pvwz7+lBZuor5chmyZ 0/eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MS61GMgEvdHYUsX/D1TRCCawW8p8Qqopt15uSqVsXJY=; b=j/KcdB5hZmdQBylO99LeulKG+L56bkhgbW5uP25SVyOzCeCQAX0uZG5owoyynHCKUL eT/DD1A+yI1iaPVAzEeEgk4p092R9nxMTq2iF7go4EAK3I1+zyz9I9ZAiZgCzdBXsLEw z6iiS3mN7S9SoH7F373uXe+nnTG1DE+XUtKZgtKeoz+HNG4mUbkLnr3g7bqvQGFAPyex bLtfvl1kGwKBB32Pt75sbdTRuPs78pRxCRWsY7Nh1f9cD8Zh3Y/Mzyycemqw+MakYpYG CtiXByTHZnOk8eVgjZZt3wAVBmbwB47nZjkD66UkVQwAAb3N/6F/AF+OkfXWVXaaNITI M9TQ== X-Gm-Message-State: APjAAAXszfekPcey4U9sKh69VGIBAmJyYxk7dnCDtRIvQoZzO8TCu0LE 6AH7+g7KKTeKx3MGxUnSHXzl//5WDm8BEbDFpBK6Ow== X-Received: by 2002:a5d:5701:: with SMTP id a1mr9260849wrv.95.1565943054219; Fri, 16 Aug 2019 01:10:54 -0700 (PDT) MIME-Version: 1.0 References: <0a83fde3-1a74-684c-0d70-fb44b9021f96@molgen.mpg.de> <87h86vjhv0.fsf@notabene.neil.brown.name> <87blx1kglx.fsf@notabene.neil.brown.name> In-Reply-To: From: Jinpu Wang Date: Fri, 16 Aug 2019 10:10:43 +0200 Message-ID: Subject: Re: Bisected: Kernel 4.14 + has 3 times higher write IO latency than Kernel 4.4 with raid1 To: NeilBrown Cc: Neil F Brown , Alexandr Iarygin , Guoqing Jiang , Paul Menzel , linux-kernel@vger.kernel.org, linux-raid Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 7, 2019 at 2:35 PM Jinpu Wang wrote: > > On Wed, Aug 7, 2019 at 8:36 AM Jinpu Wang wrote: > > > > On Wed, Aug 7, 2019 at 1:40 AM NeilBrown wrote: > > > > > > On Tue, Aug 06 2019, Jinpu Wang wrote: > > > > > > > On Tue, Aug 6, 2019 at 9:54 AM Jinpu Wang wrote: > > > >> > > > >> On Tue, Aug 6, 2019 at 1:46 AM NeilBrown wrote: > > > >> > > > > >> > On Mon, Aug 05 2019, Jinpu Wang wrote: > > > >> > > > > >> > > Hi Neil, > > > >> > > > > > >> > > For the md higher write IO latency problem, I bisected it to these commits: > > > >> > > > > > >> > > 4ad23a97 MD: use per-cpu counter for writes_pending > > > >> > > 210f7cd percpu-refcount: support synchronous switch to atomic mode. > > > >> > > > > > >> > > Do you maybe have an idea? How can we fix it? > > > >> > > > > >> > Hmmm.... not sure. > > > >> Hi Neil, > > > >> > > > >> Thanks for reply, detailed result in line. > > > > > > Thanks for the extra testing. > > > ... > > > > [ 105.133299] md md0 in_sync is 0, sb_flags 2, recovery 3, external > > > > 0, safemode 0, recovery_cp 524288 > > > ... > > > > > > ahh - the resync was still happening. That explains why set_in_sync() > > > is being called so often. If you wait for sync to complete (or create > > > the array with --assume-clean) you should see more normal behaviour. > > I've updated my tests accordingly, thanks for the hint. > > > > > > This patch should fix it. I think we can do better but it would be more > > > complex so no suitable for backports to -stable. > > > > > > Once you confirm it works, I'll send it upstream with a > > > Reported-and-Tested-by from you. > > > > > > Thanks, > > > NeilBrown > > > > Thanks a lot, Neil, my quick test show, yes, it fixed the problem for me. > > > > I will run more tests to be sure, will report back the test result. > Hi Neil, > > I've run our regression tests with your patch, everything works fine > as expected. > > So Reported-and-Tested-by: Jack Wang > > Thank you for your quick fix. > > The patch should go to stable 4.12+ Hi Neil, I hope you're doing well, just a soft ping? do you need further testing from my side? Please let me know how can we move the fix forward. Thanks, Jack Wang