From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965099AbeAKRZ3 (ORCPT + 1 other); Thu, 11 Jan 2018 12:25:29 -0500 Received: from esa2.cray.iphmx.com ([68.232.143.164]:8724 "EHLO esa2.cray.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932415AbeAKRZ1 (ORCPT ); Thu, 11 Jan 2018 12:25:27 -0500 X-IronPort-AV: E=Sophos;i="5.46,345,1511827200"; d="scan'208";a="17442028" X-Cray-OBMMKR: 1433258124 17442028 From: Ben Evans To: Fabian Huegel , Oleg Drokin , Andreas Dilger , James Simmons , Lai Siyao , "John L . Hammond" , Greg Kroah-Hartman , "devel@driverdev.osuosl.org" , Ben Evans , NeilBrown CC: "lustre-devel@lists.lustre.org" , "linux-kernel@vger.kernel.org" , "linux-kernel@i4.cs.fau.de" Subject: Re: Thread-Index: AQHTiwAfQ1QwSs/FakeoilTrUf3a9KNumLyA Date: Thu, 11 Jan 2018 17:25:20 +0000 Message-ID: References: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> In-Reply-To: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> 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=bevans@cray.com; x-originating-ip: [136.162.34.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR11MB1773;6:PtVnacub1qNRGGQhKw6su1kj3III/jWEVvT5us2+9LWFhT5FKSALzWwCmGQMEwLHRze1+ciGMw62OupAKg0ZjpMOnETQ9FiI2owhjHMw/eNScic1GKUYg5jVrAtJzyUB3pwifMlK2O8NkqymaDcTEXZpXEuYxrnR6jq2OY+2Lz04W2K3uMlLm9ar0BYlawvMaE9+k5xHVE5kaBvCvyAO+FC8/WCOxDUzr16Cq/0tenHOK4yupCDiU3tDtM5vhCJy9M/kZNY+B0L+bhi/iZlGApz79ldpT+cIDMppGzwuY1mWRSJ0qqf816/Hty2nEDAElE3c+os2Mqbua0qsccVkJ/HFJ+LVwrCwXvMlOQwk8RKPfoQTK/Fv/vEVgjzdsi85;5:Eip15z6FCDiuC/YnWHErc+KbT23sBTwFt4WOWMDvm43ZYpc5ZGUjYsOyir47J8JxLgLJib9ZBLrzPicM9plZR7GA62jK4MJTocXRB6nnUwTPapzpF/1o5Gsmn4TsIo3JgVwSgG4xK15OfVL9bb8/vzHQnJwyP62bJv7E7i33P9g=;24:18ftd8xt9Ztz0xH+SyEtT+TNw/5H9qelckOuOrQf1nzouCWVtuiltlrGyfVgwXyTEzaIaEouyzZ9xbbhrGq63yHra9rX6rHXDBNkYfvRp5Y=;7:8+eLKJNYvipF4aEpDFEHhSLIcQSUB0toWReWTCkBU0Nm6AjYEujEvpr1In1ix6GWKwT1ZH8+L4JRoBLJvoM4jsOc4dW0mJzCpVRFQOGKAbgo/EBLY4PkXvr4n/3zBhRJZUbZrJ+Gc5pUER6codiPIeAbsr2Pq+6ZklTOMjZHghiEhBnmH6ijrE19bIjdSRuN3t/l1Q2MRavNYl/t32H7Td3szXbXw8GKsIcJbNU4Uvt7y+cdtuJ0MUEa4T8u+rP4 x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(39380400002)(366004)(396003)(39850400004)(376002)(346002)(189003)(24454002)(199004)(5660300001)(81156014)(3846002)(66066001)(81166006)(99286004)(2900100001)(6116002)(36756003)(3280700002)(3660700001)(2501003)(6486002)(229853002)(7116003)(3480700004)(8676002)(4000700002)(53936002)(8936002)(2950100002)(6246003)(6512007)(77096006)(221173001)(4326008)(316002)(4743002)(106356001)(97736004)(478600001)(7416002)(7736002)(86362001)(6506007)(6436002)(25786009)(110136005)(54906003)(53546011)(2906002)(102836004)(68736007)(14454004)(76176011)(105586002)(305945005)(94096001)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR11MB1773;H:MWHPR11MB1774.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 2d6509c6-b8c9-4374-660c-08d559184abb x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020069)(4652020)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:MWHPR11MB1773; x-ms-traffictypediagnostic: MWHPR11MB1773: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(245156298449039)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3231023)(944501134)(93006095)(93001095)(3002001)(6041268)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011);SRVR:MWHPR11MB1773;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:MWHPR11MB1773; x-forefront-prvs: 0549E6FD50 x-microsoft-antispam-message-info: s+5KAjTnn8THloghw8m0RoQAIQxhjhAx0VH31fozh/YaJHYan+0olon0oQLh6NC9+PMvdhyCSjBVHJFQUFgkzw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2d6509c6-b8c9-4374-660c-08d559184abb X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2018 17:25:20.8956 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e7b8488a-c0cd-4614-aae1-996bfabec247 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1773 X-OriginatorOrg: cray.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: I've been working off and on with this. Since you're getting into the counters in a couple of the patches, part of the reason for all the #defines here are because MDC, MDT and OST counters are all shoved into the same array dynamically, sometimes. It would be a much cleaner approach to have a separate array for the MDC stats, then print them conditionally. This would reduce all of the calls to these macros to counter increments. -Ben Evans On 1/11/18, 12:16 PM, "Fabian Huegel" wrote: >We cleaned up a lot of checkpatch errors and warnings in obd_class.h, >but there are still some CHECKs and two warnings about flow control >inside macros left. > >Changing those macros to inline functions would probably >be a good idea, unfortunatly it's not straightforward since they use >'#op' to print the name of the operation. > >We also did some aligning to make the code more readable and removed >an unnecessary macro. > >We only tested, that the kernel still compiles and the lustre kernel >module loads successfully, but given the harmless nature of these >changes we don't expect any problems. > >The patches are based on the staging-testing branch of the staging tree. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Evans Date: Thu, 11 Jan 2018 17:25:20 +0000 Subject: [lustre-devel] (no subject) In-Reply-To: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> References: <1515691022-22729-1-git-send-email-fabian_huegel@web.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Fabian Huegel , Oleg Drokin , Andreas Dilger , James Simmons , Lai Siyao , "John L . Hammond" , Greg Kroah-Hartman , "devel@driverdev.osuosl.org" , Ben Evans , NeilBrown Cc: "lustre-devel@lists.lustre.org" , "linux-kernel@vger.kernel.org" , "linux-kernel@i4.cs.fau.de" I've been working off and on with this. Since you're getting into the counters in a couple of the patches, part of the reason for all the #defines here are because MDC, MDT and OST counters are all shoved into the same array dynamically, sometimes. It would be a much cleaner approach to have a separate array for the MDC stats, then print them conditionally. This would reduce all of the calls to these macros to counter increments. -Ben Evans On 1/11/18, 12:16 PM, "Fabian Huegel" wrote: >We cleaned up a lot of checkpatch errors and warnings in obd_class.h, >but there are still some CHECKs and two warnings about flow control >inside macros left. > >Changing those macros to inline functions would probably >be a good idea, unfortunatly it's not straightforward since they use >'#op' to print the name of the operation. > >We also did some aligning to make the code more readable and removed >an unnecessary macro. > >We only tested, that the kernel still compiles and the lustre kernel >module loads successfully, but given the harmless nature of these >changes we don't expect any problems. > >The patches are based on the staging-testing branch of the staging tree. >