From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx136.postini.com [74.125.245.136]) by kanga.kvack.org (Postfix) with SMTP id 0039B6B005C for ; Thu, 8 Dec 2011 02:26:24 -0500 (EST) Received: by wgbds13 with SMTP id ds13so2322109wgb.26 for ; Wed, 07 Dec 2011 23:26:23 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1323327732-30817-1-git-send-email-consul.kautuk@gmail.com> Date: Thu, 8 Dec 2011 12:56:22 +0530 Message-ID: Subject: Re: [PATCH 1/1] vmalloc: purge_fragmented_blocks: Acquire spinlock before reading vmap_block From: Kautuk Consul Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Andrew Morton , Joe Perches , Minchan Kim , David Vrabel , linux-mm@kvack.org, linux-kernel@vger.kernel.org > > That's intentional as an optimization, we don't care if > vb->free + vb->dirty =3D=3D VMAP_BBMAP_BITS && vb->dirty !=3D VMAP_BBMAP_= BITS > would speculatively be true after we grab vb->lock, we'll have to purge i= t > next time instead. =A0We certainly don't want to grab vb->lock for blocks > that aren't candidates, so this optimization is a singificant speedup. Ah, I agree. Anyway, the probability of there being too many vmap_blocks being missed due to concurrent changes is not quite high, so I guess its okay that a few vmap_blocks get purged next time. Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org