From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751264AbdJSXYF (ORCPT ); Thu, 19 Oct 2017 19:24:05 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:37385 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdJSXYC (ORCPT ); Thu, 19 Oct 2017 19:24:02 -0400 X-IronPort-AV: E=Sophos;i="5.43,404,1503331200"; d="scan'208";a="161338331" From: Bart Van Assche To: "mingo@kernel.org" , "peterz@infradead.org" , "byungchul.park@lge.com" CC: "linux-kernel@vger.kernel.org" , "amir73il@gmail.com" , "linux-block@vger.kernel.org" , "hch@infradead.org" , "linux-xfs@vger.kernel.org" , "tglx@linutronix.de" , "linux-mm@kvack.org" , "oleg@redhat.com" , "darrick.wong@oracle.com" , "johannes.berg@intel.com" , "linux-fsdevel@vger.kernel.org" , "idryomov@gmail.com" , "tj@kernel.org" , "kernel-team@lge.com" , "david@fromorbit.com" Subject: Re: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map Thread-Topic: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map Thread-Index: AQHTR/T3eL1/ixvRQkSJ6yiAuin4s6Lr0sMA Date: Thu, 19 Oct 2017 23:24:00 +0000 Message-ID: <1508455438.4542.4.camel@wdc.com> References: <1508319532-24655-1-git-send-email-byungchul.park@lge.com> <1508319532-24655-2-git-send-email-byungchul.park@lge.com> In-Reply-To: <1508319532-24655-2-git-send-email-byungchul.park@lge.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; x-originating-ip: [63.163.107.201] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1536;20:kZ+irs8vK+z7wzMGdN3aJ57Bi3N/5mkFANHfDi8uLeumONfiYXI2mtWdcmSbe3t3iRgDRAapRLvZ4yW+OV1c96N0fzWt+jsNw+UZFL8dg9ORoCre/8OHLjPLnVnzvbK++00YUNPkb10l96OwHxgwb2jYovQwLodZ/OOp1E1e/pM= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: e7c9668a-3c66-42cf-cb26-08d517487a6c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254172)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(48565401081)(2017052603199)(201703131423095);SRVR:CY1PR0401MB1536; x-ms-traffictypediagnostic: CY1PR0401MB1536: wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1536;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1536; x-forefront-prvs: 0465429B7F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(376002)(39860400002)(346002)(199003)(189002)(24454002)(377424004)(25786009)(305945005)(101416001)(66066001)(39060400002)(110136005)(76176999)(50986999)(54356999)(7736002)(2906002)(478600001)(8676002)(54906003)(3280700002)(81166006)(8936002)(81156014)(53936002)(3660700001)(189998001)(6512007)(99286003)(6246003)(33646002)(68736007)(2900100001)(6436002)(6486002)(77096006)(6506006)(105586002)(14454004)(5660300001)(106356001)(36756003)(86362001)(2950100002)(2201001)(97736004)(316002)(2501003)(4001150100001)(72206003)(3846002)(102836003)(103116003)(7416002)(229853002)(4326008)(6116002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1536;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <3817A0B346BD1B438366B1442EDB7895@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2017 23:24:00.1358 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1536 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v9JNOQUX021090 On Wed, 2017-10-18 at 18:38 +0900, Byungchul Park wrote: > Sometimes, we want to initialize completions with sparate lockdep maps > to assign lock classes under control. For example, the workqueue code > manages lockdep maps, as it can classify lockdep maps properly. > Provided a function for that purpose. > > Signed-off-by: Byungchul Park > --- > include/linux/completion.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/linux/completion.h b/include/linux/completion.h > index cae5400..182d56e 100644 > --- a/include/linux/completion.h > +++ b/include/linux/completion.h > @@ -49,6 +49,13 @@ static inline void complete_release_commit(struct completion *x) > lock_commit_crosslock((struct lockdep_map *)&x->map); > } > > +#define init_completion_with_map(x, m) \ > +do { \ > + lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \ > + (m)->name, (m)->key, 0); \ > + __init_completion(x); \ > +} while (0) Are there any completion objects for which the cross-release checking is useful? Are there any wait_for_completion() callers that hold a mutex or other locking object? Thanks, Bart.