Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4651408imm; Mon, 14 May 2018 10:33:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpqSkrR3q2Q/6Wh5IugGTt9sR2YWyUWlYD4mLIV8XDAzkxfu39yD7xgeVkNn7/i+/0TYa65 X-Received: by 2002:a17:902:a4:: with SMTP id a33-v6mr10671134pla.346.1526319239741; Mon, 14 May 2018 10:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526319239; cv=none; d=google.com; s=arc-20160816; b=st6/Wibpf5yH2VN5e7ULqBKv+5zjG0DPmCDiRktKQrsRdJhCNRO8t3PgTUL4UfcAC8 WrQgifAy4dqGZl2d4gAliOlMh8ryvVzaQ3FGT+0n1dbrS1ylIgvGRQDOZcvISJGm0Hpa jpax+vTMZZYl20Isi87MXVSN5fqj8z6uu87E8B22BcwYpA8uWBDlhOWZZ+ynB+3KUa3y T3rQNVrD1B0WghiSQqd4NCWhUU8YFKkxwLayNFpLnaQbYXZLbr3aKWj329k0Kx2gihTb CCIoiZIvHrwgj44SJ+e8FKuCvmGebSkCwWmqloEGb3eAVmHYEM3N6raATJ5ighHY+bfa OArA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=97RyYdPQUHqzpQQAJbxFAxILE4wkRZ8WefP4rmZOrqs=; b=c4eqTcKYrQyqkSUk/RG6tXEDH7WmX3R9wdOBkk3q2i+95q+TcYyvxye772rWnbcRJ/ bB375SROKPLvMYEw7+KPRNjNqNNvOKphPx708muslvkidNaB15fAv7eyipnsRZaIc/0v 91cR7BSwJ0cRekVrtsrZEb4mRViggFtclBB40a4leJvZRkkkmsA4/yqtPuG1aupbfE3G eRi1vL98Titcpb8rz/E73FO5e9SxSvCXvxMYR7D+oXtzchaA+jXyDrBOhi54WZTtsyuQ /GpdWO/btW5nwA0oi/XjaoJ+XEe+fVXr4VyFgOWMw/A6H+M2n2QT+ZGx8uObuXFuGNxA Vcjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=BXKkiqOZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13-v6si9296671plq.464.2018.05.14.10.33.43; Mon, 14 May 2018 10:33:59 -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=@oracle.com header.s=corp-2017-10-26 header.b=BXKkiqOZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932914AbeENQyv (ORCPT + 99 others); Mon, 14 May 2018 12:54:51 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:34258 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbeENQyq (ORCPT ); Mon, 14 May 2018 12:54:46 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4EGkA2o012603; Mon, 14 May 2018 16:54:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=97RyYdPQUHqzpQQAJbxFAxILE4wkRZ8WefP4rmZOrqs=; b=BXKkiqOZlvDHUN06a9dm5i0HCD1BCPSso5LeT0eZWhVineBWJPyARnlZ0AspAKrONoVw mzreD6/tJj1jCeq8AxL1hLFNLDRECJSJ/Zfwe87ASlIMStUj504A8dXZZ+4z29cV3RzW jCaKNwipYBPAximeiw9hBAZtlfvBVlBuRmb34R+TspfK9Z2hVdW5+ZGn25pPQmGrtPNr A7pJhnrlKHeFfpDObxYAvwYwQYO+xAB1gldQK9LsJJDoGPmwA0ChbYfPotzRnIi/MyLL L3ZCpMtqD3Nebf+6eUMJJWdwdi120c+HNoi5kuzoV391dnZplCzGHbShQJnoH3x1tX88 Lw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2hx29vvwkx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 May 2018 16:54:40 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4EGseMP024911 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 May 2018 16:54:40 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4EGsd0j013936; Mon, 14 May 2018 16:54:39 GMT Received: from [10.39.255.157] (/10.39.255.157) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 14 May 2018 09:54:39 -0700 Subject: Re: [PATCH v3 0/1] multi-threading device shutdown To: Greg KH 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 References: <20180507155402.10086-1-pasha.tatashin@oracle.com> <20180514150336.GA18769@kroah.com> From: Pavel Tatashin Message-ID: Date: Mon, 14 May 2018 12:54:37 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180514150336.GA18769@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8893 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805140171 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/14/2018 11:03 AM, Greg KH wrote: > 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? Hi Greg, Sure, I will add a kernel parameter to optionally disable this feature in the next patch revision. Thank you, Pavel > > thanks, > > greg k-h >