From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbZIIEPo (ORCPT ); Wed, 9 Sep 2009 00:15:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751486AbZIIEPn (ORCPT ); Wed, 9 Sep 2009 00:15:43 -0400 Received: from smtp-out.google.com ([216.239.45.13]:38172 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985AbZIIEPn (ORCPT ); Wed, 9 Sep 2009 00:15:43 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id: references:user-agent:mime-version:content-type:x-system-of-record; b=TIFXEAp5SfzuoCaUVeUBxyay9LRj1HYfLicWttpPxadmIqOgmOm936MYG3K05OjkO rThxhkgnaFNzj7OXJzJuA== Date: Tue, 8 Sep 2009 21:15:39 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Li Zefan cc: Dave Hansen , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch 3/4 -mm] flex_array: poison free elements In-Reply-To: <4AA724CB.1070401@cn.fujitsu.com> Message-ID: References: <1251129384.22398.7166.camel@nimitz> <1251150156.22398.8289.camel@nimitz> <4AA70D4F.3040503@cn.fujitsu.com> <4AA72175.5000108@cn.fujitsu.com> <4AA724CB.1070401@cn.fujitsu.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Sep 2009, Li Zefan wrote: > > Gack, ftrace_page would probably be better off simply using the flex list > > implementation I suggested which constructs a list from page->lru since it > > doesn't appear to require indexing into the array, it simply requires an > > iteration in all cases (or am I wrong?). Flex lists could easily be made > > to support seqfiles. > > > > Right, iteration is needed but indexing is not. I thought > about flex list too, flex array has some limitations which > make it hard to find a real user. > I agree, the cgroup pidarray could be converted into a flex list implementation as well as ftrace_page, it appears. All the metadata can be stored by overloading struct page and linking them in a dynamically expanding list on page->lru. I'm thinking Andrew will want to see some user of this library in 2.6.32 that cannot be served by a flex list type of implementation if we're to keep it merged in the kernel.