Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbbH0Bfl (ORCPT ); Wed, 26 Aug 2015 21:35:41 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:45534 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbbH0Bfk (ORCPT ); Wed, 26 Aug 2015 21:35:40 -0400 From: =?utf-8?B?5rKz5ZCI6Iux5a6PIC8gS0FXQUnvvIxISURFSElSTw==?= To: "'minyard@acm.org'" CC: "openipmi-developer@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 7/7] ipmi/kcs: Don't run the KCS state machine when it is KCS_IDLE Thread-Topic: [PATCH 7/7] ipmi/kcs: Don't run the KCS state machine when it is KCS_IDLE Thread-Index: AQHQ1c5R+UxrINSkDEO5r8EHT60uwp4RB7iggAa6goCAAqlZUIAAXd0AgAFaueCAAhSQgIAA67Gw Date: Thu, 27 Aug 2015 01:35:36 +0000 Message-ID: <04EAB7311EE43145B2D3536183D1A84454953AB9@GSjpTKYDCembx31.service.hitachi.net> References: <20150727055516.4759.34462.stgit@softrs> <20150727055516.4759.65106.stgit@softrs> <55CAC849.70902@acm.org> <04EAB7311EE43145B2D3536183D1A84454938089@GSjpTKYDCembx31.service.hitachi.net> <55D8B543.4000805@acm.org> <04EAB7311EE43145B2D3536183D1A8445493D025@GSjpTKYDCembx31.service.hitachi.net> <55DB3F8E.5030100@acm.org> <04EAB7311EE43145B2D3536183D1A8445495009D@GSjpTKYDCembx31.service.hitachi.net> <55DE2127.3010402@acm.org> In-Reply-To: <55DE2127.3010402@acm.org> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.198.220.63] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 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 mail.home.local id t7R1ZkHh028514 Content-Length: 2792 Lines: 59 > From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard > > On 08/24/2015 10:53 PM, 河合英宏 / KAWAI,HIDEHIRO wrote: > >> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard > >> > >> On 08/23/2015 08:52 PM, 河合英宏 / KAWAI,HIDEHIRO wrote: > >>>> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard > >>>> > >>>> On 08/17/2015 09:54 PM, 河合英宏 / KAWAI,HIDEHIRO wrote: > >>>>>> From: Corey Minyard [mailto:tcminyard@gmail.com] On Behalf Of Corey Minyard > >>>>>> > >>>>>> This patch will break ATN handling on the interfaces. So we can't do this. > >>>>> I understand. So how about doing like this: > >>>>> > >>>>> /* All states wait for ibf, so just do it here. */ > >>>>> - if (!check_ibf(kcs, status, time)) > >>>>> + if (kcs->state != KCS_IDLE && !check_ibf(kcs, status, time)) > >>>>> return SI_SM_CALL_WITH_DELAY; > >>>>> > >>>>> I think it is not necessary to wait IBF when the state is IDLE. > >>>>> In this way, we can also handle the ATN case. > >>>> I think it would be more reliable to go up a level and add a timeout. > >>> It may be so, but we should address this issue separately (at least > >>> I think above solution reasonably solves the issue). > >>> > >>> This issue happens after all queued messages are processed or dropped > >>> by timeout. There is no current message. So what should we set > >>> a timeout against? We can add a timeout into my new flush_messages(), > >>> but that is meaningful only in panic context. That doesn't help > >>> in normal context; we would perform a busy loop of smi_event_handler() > >>> and schedule() in ipmi_thread(). > >> I'm a little confused here. Is the problem that the ATN bit is stuck > >> high? If so, it's going to be really hard to work around this without > >> breaking ATN handling. > > Sorry for my insufficient explanation. I assume the case where > > IBF bit is always 1. I don't know what happens when > > BMC hangs up, but I guess IBF stays in 1 because my server's > > BMC behaves as such while rebooting. > > > Ok, your patch above makes sense, then. IBF is irrelevant when in idle > state, > so ignore it then, and then in your case it will return KCS_IDLE and > cause that > operation to complete. I'm ok with the patch you posted above, I think > it will > work correctly and solve the problem. > > I would like a detailed comment, though, so people (forgetful people > like me :) > can figure out why it is there. Sure. I'll post the revised version with detailed comment and description later including PATCH 6/7. Thanks, Hidehiro Kawai ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?