Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0670FC433F5 for ; Mon, 13 Dec 2021 03:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231452AbhLMDX3 (ORCPT ); Sun, 12 Dec 2021 22:23:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:33220 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbhLMDX2 (ORCPT ); Sun, 12 Dec 2021 22:23:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639365807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2skDNVKo25BiMyqDlfguThb2xQemx2Ye13yt8UEzpJ0=; b=TkXnBUymCSYi/dP/O//OBEfIZPo3uhAzVyKxut7TWv1LrR3mpqnDsAmrrUhrRsZqtzy+89 qmoEnWFu6GJ4exHMAoAuw2uxVtiIGGt1bEcUVZ+xhEtU4zMnvaYVekdc4COfOitEibSE1M v4vpYIpMnO2SsI+cWCsfNFXTed2vNZI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-551-z2hyQz-JPIuS77Xbp7IOZw-1; Sun, 12 Dec 2021 22:23:22 -0500 X-MC-Unique: z2hyQz-JPIuS77Xbp7IOZw-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94621801B35; Mon, 13 Dec 2021 03:23:20 +0000 (UTC) Received: from T590 (ovpn-8-29.pek2.redhat.com [10.72.8.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 634D54ABA9; Mon, 13 Dec 2021 03:23:12 +0000 (UTC) Date: Mon, 13 Dec 2021 11:23:08 +0800 From: Ming Lei To: Dexuan Cui Cc: Jens Axboe , 'Christoph Hellwig' , "'linux-block@vger.kernel.org'" , Long Li , "Michael Kelley (LINUX)" , "'linux-kernel@vger.kernel.org'" Subject: Re: Random high CPU utilization in blk-mq with the none scheduler Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dexuan, On Sat, Dec 11, 2021 at 03:10:43AM +0000, Dexuan Cui wrote: > > From: Jens Axboe > > Sent: Friday, December 10, 2021 6:05 PM > > ... > > It's more likely the real fix is avoiding the repeated plug list scan, > > which I guess makes sense. That is this commit: > > > > commit d38a9c04c0d5637a828269dccb9703d42d40d42b > > Author: Jens Axboe > > Date: Thu Oct 14 07:24:07 2021 -0600 > > > > block: only check previous entry for plug merge attempt > > > > If that's the case, try 5.15.x again and do: > > > > echo 2 > /sys/block//queue/nomerges > > > > for each drive you are using in the IO test, and see if that gets > > rid of the excess CPU usage. > > > > -- > > Jens Axboe > > Thanks for the reply! Unluckily this does not work. > > I tried the below command: > > for i in `ls /sys/block/*/queue/nomerges`; do echo 2 > $i; done > > and verified that the "nomerges" are changed to "2", but the > excess CPU usage can still reproduce easily. Can you provide the following blk-mq debugfs log? (cd /sys/kernel/debug/block/dm-N && find . -type f -exec grep -aH . {} \;) (cd /sys/kernel/debug/block/sdN && find . -type f -exec grep -aH . {} \;) And it is enough to just collect log from one dm-mpath & one underlying iscsi disk, so we can understand basic blk-mq setting, such as nr_hw_queues, queue depths, ... Thanks, Ming