From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K. V" Subject: Re: [PATCH 1/2] [net/9p] Set the condition just before waking up. Date: Tue, 15 Mar 2011 15:41:57 +0530 Message-ID: <8739mor8uq.fsf@linux.vnet.ibm.com> References: <1300140761-8769-1-git-send-email-jvrao@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, "Venkateswararao Jujjuri \(JV\)" To: "Venkateswararao Jujjuri \(JV\)" , v9fs-developer@lists.sourceforge.net Return-path: Received: from e28smtp08.in.ibm.com ([122.248.162.8]:58503 "EHLO e28smtp08.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751659Ab1COKMF (ORCPT ); Tue, 15 Mar 2011 06:12:05 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp08.in.ibm.com (8.14.4/8.13.1) with ESMTP id p2F9HIxn013292 for ; Tue, 15 Mar 2011 14:47:18 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2FAC0wU4059164 for ; Tue, 15 Mar 2011 15:42:01 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2FAC0Kp003251 for ; Tue, 15 Mar 2011 21:12:00 +1100 In-Reply-To: <1300140761-8769-1-git-send-email-jvrao@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 14 Mar 2011 15:12:41 -0700, "Venkateswararao Jujjuri (JV)" wrote: > Given that the sprious wake-ups are common, we need to move the > condition setting right next to the wake_up(). I don't understand the above. What do you mean by spurious wakeups are common ? I guess what happened was that when the work queue got woken up via p9_client_cb, another request req->status was found to be received (REQ_STATUS_RCVD) because we set it ahead. So it is not that spurious wakeups are common, but rather it is a bug we had right ? > After setting the condition > to req->status = REQ_STATUS_RCVD, sprious wakeups may cause the > virtqueue back on the free list for someone else to use. > This may result in kernel panic while relasing the pinned pages > in p9_release_req_pages(). But why are we doing that release pages in the req_done path. ? why not after we wake up the sleeper in p9_client_rpc ? -aneesh