From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdJ3HKk (ORCPT ); Mon, 30 Oct 2017 03:10:40 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:9544 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdJ3HKj (ORCPT ); Mon, 30 Oct 2017 03:10:39 -0400 Subject: Re: [RFC][PATCH 1/8] epoll: remove epmutex from ep_free() & eventpoll_release_file() To: Davidlohr Bueso References: <1509195507-29037-1-git-send-email-houtao1@huawei.com> <1509195507-29037-2-git-send-email-houtao1@huawei.com> <20171028135854.mpdcngbkozssucrs@linux-n805> CC: , , , , , From: Hou Tao Message-ID: Date: Mon, 30 Oct 2017 15:09:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171028135854.mpdcngbkozssucrs@linux-n805> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.14] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.59F6D068.0034,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 270fb236209174cb91bbaecc8b84ae0f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2017/10/28 21:58, Davidlohr Bueso wrote: > On Sat, 28 Oct 2017, Hou Tao wrote: > >> Remove the global epmutex from ep_free() and eventpoll_release_file(). >> In the later patches, we will add locks with a smaller granularity >> to serve the same purposes of epmutex. >> >> Signed-off-by: Hou Tao >> --- >> fs/eventpoll.c | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/fs/eventpoll.c b/fs/eventpoll.c >> index 2fabd19..26ab0c5 100644 >> --- a/fs/eventpoll.c >> +++ b/fs/eventpoll.c >> @@ -835,7 +835,6 @@ static void ep_free(struct eventpoll *ep) >> * anymore. The only hit might come from eventpoll_release_file() but >> * holding "epmutex" is sufficient here. >> */ > ^^ > What about this comment (and the equivalent one in eventpoll_release_file()? > >> - mutex_lock(&epmutex); > Thanks for your reminder. I will fix the related comments in a v1 patchset. > ...even if you fix it in a later patch, this patch breaks bisection. Now > we just race between ep_free() and eventpoll_release_file(). This patch > should be folded in, no? Yes, the patchset should be squashed into one patch, however it will be difficult to explain the purpose of these modifications, so I break them into little pieces, and hoped that these little patches can explain the reason why the modification is needed in a cleaner way. It also will be fixed in v1 patch. Regards, Tao > Thanks, > Davidlohr > > . >