Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759331AbcLPUIR (ORCPT ); Fri, 16 Dec 2016 15:08:17 -0500 Received: from mail-dm3nam03on0054.outbound.protection.outlook.com ([104.47.41.54]:55495 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757317AbcLPUII (ORCPT ); Fri, 16 Dec 2016 15:08:08 -0500 X-Greylist: delayed 8054 seconds by postgrey-1.27 at vger.kernel.org; Fri, 16 Dec 2016 15:08:07 EST From: "Chickles, Derek" To: Nicholas Mc Guire CC: "Burla, Satananda" , "Manlunas, Felix" , "Vatsavayi, Raghu" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] liquidio CN23XX: make timeout HZ independent Thread-Topic: [PATCH] liquidio CN23XX: make timeout HZ independent Thread-Index: AQHSV3OpJiM35Hk1vEWJrtE+ZHgWBqEK/4aQ Date: Fri, 16 Dec 2016 20:08:04 +0000 Message-ID: References: <1481875839-30860-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1481875839-30860-1-git-send-email-hofrat@osadl.org> 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=Derek.Chickles@cavium.com; x-originating-ip: [50.233.148.156] x-microsoft-exchange-diagnostics: 1;MWHPR07MB3182;7:6auGNFUUDJ2Gs32DyUVII/95JlQ0zGJCR7FNY0o/AxKKjKl17Pj45FbhbO5v7YYev7r51BKPBfOROJT0aWOv7Gf2RD6djgJJk0Y7aYLXstcwXCTAiXYaeLWUEsPSB2vnIw6wyHpNh6pf4+Z1LW7NFXLVPyT5I2aUasw4fG4Ef4MD1PMR8e/QQGNypaKtaAfYKU9H4583HObnCi1AFdMyTqlL4L+logaCHsiKw4X7yVzZ/aRoxN4FMGsi3VnCNnCmtFJH4R0W1zFkcSYUqrkj9N//GYnTY1eMbeFl9c4juSBzzknmmk/BXkrCd5tNKSoxwAjweR5Yf9lgKnFSs3KCOil3QJKGbJa4Qcg3NkOIu9YwEmfDDB4jzqbRySxOUPVKdDn5NAVM2C7k0wuycY/tYpcuLu2PPuxOewENqP/IhxswdAmUvOcFmih3ZUGqmTolnoMqr3EyvndW6g2XSIS8JA== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39410400002)(39830400002)(377454003)(199003)(13464003)(189002)(8676002)(102836003)(81166006)(9686002)(92566002)(68736007)(101416001)(2906002)(4326007)(3660700001)(3280700002)(189998001)(7736002)(76176999)(106356001)(2900100001)(54356999)(105586002)(122556002)(50986999)(106116001)(97736004)(74316002)(305945005)(99286002)(3846002)(7696004)(2950100002)(6916009)(6116002)(25786008)(81156014)(38730400001)(6436002)(8936002)(77096006)(6506006)(5660300001)(229853002)(76576001)(110136003)(33656002)(66066001)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR07MB3182;H:MWHPR07MB2943.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: 2f3994a5-49f2-4bc4-fbd0-08d425ef3ed1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR07MB3182; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:MWHPR07MB3182;BCL:0;PCL:0;RULEID:;SRVR:MWHPR07MB3182; x-forefront-prvs: 01583E185C spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2016 20:08:04.5020 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3182 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 quoted-printable to 8bit by mail.home.local id uBGK8KMp021422 Content-Length: 1833 Lines: 46 > -----Original Message----- > From: Nicholas Mc Guire [mailto:hofrat@osadl.org] > Sent: Friday, December 16, 2016 12:11 AM > To: Chickles, Derek > Cc: Burla, Satananda; Manlunas, Felix; Vatsavayi, Raghu; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Nicholas Mc Guire > Subject: [PATCH] liquidio CN23XX: make timeout HZ independent > > schedule_timeout_* takes a timeout in jiffies but the code currently is > passing in a constant which makes this timeout HZ dependent, so pass it > through msecs_to_jiffies() to fix this up. > > Signed-off-by: Nicholas Mc Guire > --- > > Problem found by coccinelle spatch > > The current delay can vary by a factor 10 depending on the HZ > setting chose, which does not seem reasonable here. > > The below patch sets the timeout to 10ms - it is though not clear > if this is the intent or if it should be longer/shorter as it is not > clear what HZ setting was assumed during design and used for testing. > > This needs an ack by someone who knows the device and can confirm that > 10ms is reasonable to wait for completion of queuing. We were actually looking at this in parallel already to speed up driver loading. It would be better if we changed LIO_MBOX_WRITE_WAIT_TIME to 1 and applied the msecs_to_jiffies() to the line specified in your patch and the loop just above that. while (readq(mbox->mbox_write_reg) != OCTEON_PFVFSIG) { schedule_timeout_uninterruptible(LIO_MBOX_WRITE_WAIT_TIME); if (count++ == LIO_MBOX_WRITE_WAIT_CNT) { ret = OCTEON_MBOX_STATUS_FAILED; break; } } If you can provide a new patch with both the changes we'll sign off on it. Otherwise, it's on our list and we'll submit it soon ourselves. Thanks, Derek