From patchwork Wed Aug 30 05:20:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 9928757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7870260309 for ; Wed, 30 Aug 2017 05:18:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AEE02625B for ; Wed, 30 Aug 2017 05:18:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FBC12684F; Wed, 30 Aug 2017 05:18:29 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable 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 1EB562625B for ; Wed, 30 Aug 2017 05:18:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270AbdH3FSR (ORCPT ); Wed, 30 Aug 2017 01:18:17 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:38397 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbdH3FSP (ORCPT ); Wed, 30 Aug 2017 01:18:15 -0400 Received: by mail-pg0-f44.google.com with SMTP id b8so17053200pgn.5; Tue, 29 Aug 2017 22:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Gs4nilc2Pocs8z7rXB5h6wfG4q8uMhoYbcsbP7W/vlQ=; b=t+k5bq5WQBs9OK5nJNGMnAN93Wb+MVunOh6nXW/J4ETELUVPzJWF9Mw7OEe2XhewEk cPJPEZ5tXpOcZjs6miIKULzEURgLbbBLgVYbOWsp3ysD62A/TxxzGZIZyh6+ZXB0fW4i qK5rSFgE2dfU+QcnmG/rjVeiJM9uQ6vKIhFqKx9IT1InH+9mwITKIFQ2trfRdLZ4y0Jb SIWWG3BpediYnYK8MVkEd9Ks/UImc6mIIfMgsCzQ9A0YqkvGoeKwUhlrdEgQDnG+p/g9 0ROvIUhGMp1E8ngV80Y5UvHW9yky+xd+w5pO65Be8xK9oO0o8IwKv8dCFoeKx9xRhXYi MLiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Gs4nilc2Pocs8z7rXB5h6wfG4q8uMhoYbcsbP7W/vlQ=; b=PACtMCa+LpZMKGkjYqWPpJ3rDEqBvhct5NYdriQ8Cv5oq3R6wRYboUmP5XDbwNIFqT h4jY8sewanXeFR+ZGMNRWYBla8HRxEBjCkYqlIrqZKao708eD93yTTSOWAWu40m9zsdN raLoCuTFzvJQ+7NNMo/E6sRUIG45du87Laq9Ax5PggvT0l96BT9Ec1wa3ldaroNvqyWs v/7ihknS/3fR2MgfkIadJatiXzZYJ6zmXZ9GSMXkPGd71/5AuP/mCIPW+Fki5uEfoAnl 6IIBOXVnliEt99NL26U0GJHWAhjdxvoYvaKHSJUg5SbsLm7W4cOGaq2JwOgDoLXA2IG8 VCeg== X-Gm-Message-State: AHYfb5iQtz8U73mhHIldhTEYXpIEJ8HqS3vRXlpIg6Q77uhPeHgSljP7 X9gk2mFjc3Xm6A== X-Received: by 10.84.233.134 with SMTP id l6mr414108plk.387.1504070294744; Tue, 29 Aug 2017 22:18:14 -0700 (PDT) Received: from localhost ([175.223.37.228]) by smtp.gmail.com with ESMTPSA id g63sm4602488pgc.94.2017.08.29.22.18.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Aug 2017 22:18:12 -0700 (PDT) Date: Wed, 30 Aug 2017 14:20:37 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: Bart Van Assche , peterz@infradead.org, "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "sergey.senozhatsky.work@gmail.com" , "martin.petersen@oracle.com" , "axboe@kernel.dk" , "linux-scsi@vger.kernel.org" , "sfr@canb.auug.org.au" , "linux-next@vger.kernel.org" , kernel-team@lge.com Subject: Re: possible circular locking dependency detected [was: linux-next: Tree for Aug 22] Message-ID: <20170830052037.GA432@jagdpanzerIV.localdomain> References: <20170822183816.7925e0f8@canb.auug.org.au> <20170822104708.GA491@jagdpanzerIV.localdomain> <1503438234.2508.27.camel@wdc.com> <20170823000304.GK20323@X58A-UD3R> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170823000304.GK20323@X58A-UD3R> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On (08/23/17 09:03), Byungchul Park wrote: [..] > > Byungchul, did you add the crosslock checks to lockdep? Can you have a look at > > the above report? That report namely doesn't make sense to me. > > The report is talking about the following lockup: > > A work in a worker A task work on exit to user > ------------------ --------------------------- > mutex_lock(&bdev->bd_mutex) > mutext_lock(&bdev->bd_mutex) > blk_execute_rq() > wait_for_completion_io_timeout(&A) > complete(&A) > [..] > To Peterz, > > Anyway I wanted to avoid lockdep reports in the case using a timeout > interface. Do you think it's still worth reporting the kind of lockup? > I'm ok if you do. Byungchul, a quick question. have you measured the performance impact? somehow my linux-next is notably slower than earlier 4.13 linux-next. (e.g. scrolling in vim is irritatingly slow) `time dmesg' shows some difference, but probably that's not a good test. !LOCKDEP LOCKDEP LOCKDEP -CROSSRELEASE -COMPLETIONS real 0m0.661s 0m2.290s 0m1.920s user 0m0.010s 0m0.105s 0m0.000s sys 0m0.636s 0m2.224s 0m1.888s anyone else "sees"/"can confirm" the slow down? it gets back to "usual normal" when I disable CROSSRELEASE and COMPLETIONS. --- --- -ss diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b19c491cbc4e..cdc30ef81c5e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1091,8 +1091,6 @@ config PROVE_LOCKING select DEBUG_MUTEXES select DEBUG_RT_MUTEXES if RT_MUTEXES select DEBUG_LOCK_ALLOC - select LOCKDEP_CROSSRELEASE - select LOCKDEP_COMPLETIONS select TRACE_IRQFLAGS default n help