Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760548AbZLOPDp (ORCPT ); Tue, 15 Dec 2009 10:03:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760536AbZLOPDn (ORCPT ); Tue, 15 Dec 2009 10:03:43 -0500 Received: from mail-fx0-f221.google.com ([209.85.220.221]:42661 "EHLO mail-fx0-f221.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760533AbZLOPDl convert rfc822-to-8bit (ORCPT ); Tue, 15 Dec 2009 10:03:41 -0500 MIME-Version: 1.0 In-Reply-To: <20091215183533.1a1e87d9.kamezawa.hiroyu@jp.fujitsu.com> References: <20091215183533.1a1e87d9.kamezawa.hiroyu@jp.fujitsu.com> Date: Tue, 15 Dec 2009 17:03:37 +0200 Message-ID: Subject: Re: [PATCH RFC v2 1/4] cgroup: implement eventfd-based generic API for notifications From: "Kirill A. Shutemov" To: KAMEZAWA Hiroyuki Cc: Paul Menage , Li Zefan , containers@lists.linux-foundation.org, Andrew Morton , Balbir Singh , Pavel Emelyanov , Dan Malek , Vladislav Buzov , Daisuke Nishimura , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1350 Lines: 40 On Tue, Dec 15, 2009 at 11:35 AM, KAMEZAWA Hiroyuki wrote: > On Tue, 15 Dec 2009 11:11:16 +0200 > "Kirill A. Shutemov" wrote: > >> Could anybody review the patch? >> >> Thank you. > > some nitpicks. > >> >> On Sat, Dec 12, 2009 at 12:59 AM, Kirill A. Shutemov >> wrote: > >> > +       /* >> > +        * Unregister events and notify userspace. >> > +        * FIXME: How to avoid race with cgroup_event_remove_work() >> > +        *        which runs from workqueue? >> > +        */ >> > +       mutex_lock(&cgrp->event_list_mutex); >> > +       list_for_each_entry_safe(event, tmp, &cgrp->event_list, list) { >> > +               cgroup_event_remove(event); >> > +               eventfd_signal(event->eventfd, 1); >> > +       } >> > +       mutex_unlock(&cgrp->event_list_mutex); >> > + >> > +out: >> >        return ret; >> >  } > > How ciritical is this FIXME ? > But Hmm..can't we use RCU ? It's not reasonable to have RCU here, since event_list isn't mostly-read. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/