From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751481Ab2GHQTa (ORCPT ); Sun, 8 Jul 2012 12:19:30 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:63495 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751148Ab2GHQTK (ORCPT ); Sun, 8 Jul 2012 12:19:10 -0400 MIME-Version: 1.0 In-Reply-To: References: <1340389359-2407-1-git-send-email-js1304@gmail.com> <1340389359-2407-3-git-send-email-js1304@gmail.com> Date: Mon, 9 Jul 2012 01:19:09 +0900 Message-ID: Subject: Re: [PATCH 3/3] slub: release a lock if freeing object with a lock is failed in __slab_free() From: JoonSoo Kim To: Christoph Lameter Cc: Pekka Enberg , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2012/7/7 Christoph Lameter : > On Fri, 6 Jul 2012, JoonSoo Kim wrote: > >> >> At CPU2, we don't need lock anymore, because this slab already in partial list. >> > >> > For that scenario we could also simply do a trylock there and redo >> > the loop if we fail. But still what guarantees that another process will >> > not modify the page struct between fetching the data and a successful >> > trylock? >> >> >> I'm not familiar with English, so take my ability to understand into >> consideration. > > I have a hard time understanding what you want to accomplish here. > >> we don't need guarantees that another process will not modify >> the page struct between fetching the data and a successful trylock. > > No we do not need that since the cmpxchg will then fail. > > Maybe it would be useful to split this patch into two? > > One where you introduce the dropping of the lock and the other where you > get rid of certain code paths? > Dropping of the lock is need for getting rid of certain code paths. So, I can't split this patch into two. Sorry for confusing all the people. I think that I don't explain my purpose well. I will prepare new version in which I explain purpose of patch better. Thanks for kind review. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx200.postini.com [74.125.245.200]) by kanga.kvack.org (Postfix) with SMTP id 8226E6B0083 for ; Sun, 8 Jul 2012 12:19:10 -0400 (EDT) Received: by obhx4 with SMTP id x4so17381416obh.14 for ; Sun, 08 Jul 2012 09:19:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1340389359-2407-1-git-send-email-js1304@gmail.com> <1340389359-2407-3-git-send-email-js1304@gmail.com> Date: Mon, 9 Jul 2012 01:19:09 +0900 Message-ID: Subject: Re: [PATCH 3/3] slub: release a lock if freeing object with a lock is failed in __slab_free() From: JoonSoo Kim Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter Cc: Pekka Enberg , linux-kernel@vger.kernel.org, linux-mm@kvack.org 2012/7/7 Christoph Lameter : > On Fri, 6 Jul 2012, JoonSoo Kim wrote: > >> >> At CPU2, we don't need lock anymore, because this slab already in partial list. >> > >> > For that scenario we could also simply do a trylock there and redo >> > the loop if we fail. But still what guarantees that another process will >> > not modify the page struct between fetching the data and a successful >> > trylock? >> >> >> I'm not familiar with English, so take my ability to understand into >> consideration. > > I have a hard time understanding what you want to accomplish here. > >> we don't need guarantees that another process will not modify >> the page struct between fetching the data and a successful trylock. > > No we do not need that since the cmpxchg will then fail. > > Maybe it would be useful to split this patch into two? > > One where you introduce the dropping of the lock and the other where you > get rid of certain code paths? > Dropping of the lock is need for getting rid of certain code paths. So, I can't split this patch into two. Sorry for confusing all the people. I think that I don't explain my purpose well. I will prepare new version in which I explain purpose of patch better. Thanks for kind review. -- 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/ . Don't email: email@kvack.org