Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4632218imm; Mon, 14 May 2018 10:15:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr3Gz6kNUVPXVfNbb8jG40ws4Nrx8HXWIgkZkggDhlsOICmR5f3wbNdsd66O6+Rh2GJEjmA X-Received: by 2002:a63:3104:: with SMTP id x4-v6mr9223052pgx.167.1526318111647; Mon, 14 May 2018 10:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526318111; cv=none; d=google.com; s=arc-20160816; b=O99RDW5XuPVXDlRDNrIWk0NafjlXdWR7TcL/j+UXbQjO9FdrYrHLrsiAk4rKeMs+ad ue72muRI9OZaZfbgwV4YvJbTft6vxFlUsG1/TFHWFKZnTOuTgQZr/3qGxcD8lKHOdFbU JiDLyYRIArymoffJmwe8w6/rZL5l7mzm4EToBokxvL9qsDeHdvk3dJr3KLwccUVBlbdT eNvrInQYxQXseIEImDSJQJOCB6hi6z+BdG03njVcuAJrC/YX0JUe885ZZ2ySJyUy7JAC S4WkHCu0vSg7rmqPeyfhcyd+kbO1edeRLJlnh/CCjHuFYjU4nDhrzoCQHU7t6vVE8kLn V33g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=51RQr7uY5FZhuizizBIpEMQEr+F1ryE7WTQ5LpBI03U=; b=PPHY/YnyYK3up5cOAWb5K35I6IZe8NIXWpjo15xwCAkH4Qs7JiBwmlS+t9KIH6HrzJ aUA0guRnUWH6vwIwN28/DxZr/V9ldVP9L2DmpjBnYme2JBl5cFkFIf4Lz1AJu+Xfl0dX kMdmJWUNmbehAiLbRq2JQaoEIaMXo6TJ0MBcv8awYtUL1XKi9QFG5VHczKjLdeIotra8 0vWnh2NjD4rJLBgx5OY4bcA2TWnfQtUPeYIP4XiGuhCkH0p13pHQBxx1Q0nyJ/gXx7UF Jb5uLq2VKUJM1icr136fHsU1y49eby2arLLHZQSYumXPCrOAWTQRHH0QrDhpQqtahqGx 2t+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WNWDjKJE; 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 g6-v6si7856374pgs.396.2018.05.14.10.14.56; Mon, 14 May 2018 10:15:11 -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=@kernel.org header.s=default header.b=WNWDjKJE; 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 S1754479AbeENPDy (ORCPT + 99 others); Mon, 14 May 2018 11:03:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:56764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbeENPDx (ORCPT ); Mon, 14 May 2018 11:03:53 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 43E4C20740; Mon, 14 May 2018 15:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526310232; bh=NT18MraWqQ1kCUIEGe+n/uZ0ASqQa0qyVziJK0WHVGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WNWDjKJEiJt9+rW+fEXL5p5/qnkr9iICdYQ8WQ8vHN+REbSmBU86y/QNv2GtQ8ggW klQroEJ19YI0WPrgDTqZ8nizlsRe5nLWrgzazl9nOUHWQxTCyIvJrguw8ni5powSUQ UNthKPcVUeukIRYPWifvIZpG4gpdb2b8xIXl8ioQ= Date: Mon, 14 May 2018 17:03:36 +0200 From: Greg KH To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, alexander.duyck@gmail.com, tobin@apporbit.com Subject: Re: [PATCH v3 0/1] multi-threading device shutdown Message-ID: <20180514150336.GA18769@kroah.com> References: <20180507155402.10086-1-pasha.tatashin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180507155402.10086-1-pasha.tatashin@oracle.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 11:54:01AM -0400, Pavel Tatashin wrote: > Changelog > v2 - v3 > - Fixed warning from kbuild test. > - Moved device_lock/device_unlock inside device_shutdown_tree(). > > v1 - v2 > - It turns out we cannot lock more than MAX_LOCK_DEPTH by a single > thread. (By default this value is 48), and is used to detect > deadlocks. So, I re-wrote the code to only lock one devices per > thread instead of pre-locking all devices by the main thread. > - Addressed comments from Tobin C. Harding. > - As suggested by Alexander Duyck removed ixgbe changes. It can be > done as a separate work scaling RTNL mutex. > > Do a faster shutdown by calling dev->*->shutdown(dev) in parallel. > device_shutdown() calls these functions for every single device but > only using one thread. > > Since, nothing else is running on the machine by the device_shutdown() > s called, there is no reason not to utilize all the available CPU > resources. Ah, we can hope so. I bet this is going to break something, so can we have some way of turning it on/off dynamically for when it does? thanks, greg k-h