From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f51.google.com (mail-qg0-f51.google.com [209.85.192.51]) by kanga.kvack.org (Postfix) with ESMTP id 0EFA8680DC6 for ; Sun, 4 Oct 2015 13:26:50 -0400 (EDT) Received: by qgt47 with SMTP id 47so132336027qgt.2 for ; Sun, 04 Oct 2015 10:26:49 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id s28si15178537qkl.50.2015.10.04.10.26.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Oct 2015 10:26:49 -0700 (PDT) Date: Sun, 4 Oct 2015 19:26:45 +0200 From: Andrea Arcangeli Subject: Re: [PATCH] mm/mmap.c: Remove redundant vma looping Message-ID: <20151004172645.GO19466@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Chen Gang Cc: Richard Weinberger , Andrew Morton , "kirill.shutemov@linux.intel.com" , "riel@redhat.com" , Michal Hocko , "oleg@redhat.com" , "asha.levin@oracle.com" , "pfeiner@google.com" , "vishnu.ps@samsung.com" , Linux Memory , kernel mailing list Hello Chen, On Sun, Oct 04, 2015 at 12:55:29PM +0800, Chen Gang wrote: > Theoretically, the lock and unlock need to be symmetric, if we have to > lock f_mapping all firstly, then lock all anon_vma, probably, we also > need to unlock anon_vma all, then unlock all f_mapping. They don't need to be symmetric because the unlocking order doesn't matter. To avoid lock inversion deadlocks it is enough to enforce the lock order. -- 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