From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 6FBF86B0003 for ; Sun, 11 Feb 2018 10:47:50 -0500 (EST) Received: by mail-wm0-f72.google.com with SMTP id v14so1691550wmd.3 for ; Sun, 11 Feb 2018 07:47:50 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id g21sor3396857edm.33.2018.02.11.07.47.48 for (Google Transport Security); Sun, 11 Feb 2018 07:47:48 -0800 (PST) Date: Sun, 11 Feb 2018 18:47:46 +0300 From: "Kirill A. Shutemov" Subject: Re: [PATCH v2] mm/huge_memory.c: reorder operations in __split_huge_page_tail() Message-ID: <20180211154746.j33vipgepv75dw3r@node.shutemov.name> References: <4f64569f-b8ce-54f8-33d9-0e67216bb54c@yandex-team.ru> <151835937752.185602.5640977700089242532.stgit@buzz> <20180211151433.xvza2mugfybyocoi@node.shutemov.name> 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: Konstantin Khlebnikov Cc: Konstantin Khlebnikov , linux-mm@kvack.org, Andrew Morton , Linux Kernel Mailing List , Michal Hocko , Linus Torvalds , "Kirill A. Shutemov" , Nicholas Piggin On Sun, Feb 11, 2018 at 06:32:10PM +0300, Konstantin Khlebnikov wrote: > On Sun, Feb 11, 2018 at 6:14 PM, Kirill A. Shutemov > wrote: > > On Sun, Feb 11, 2018 at 05:29:37PM +0300, Konstantin Khlebnikov wrote: > >> And replace page_ref_inc()/page_ref_add() with page_ref_unfreeze() which > >> is made especially for that and has semantic of smp_store_release(). > > > > Nak on this part. > > > > page_ref_unfreeze() uses atomic_set() which neglects the situation in the > > comment you're removing. > > Why? look into x86 smp_store_release > for PPro it use same sequence smp_wb + WRITE_ONCE > As I see spin_unlock uses exactly this macro. > > Anyway if page_ref_unfreeze cannot handle races with > get_page_unless_zero() then it completely useless, Okay, fair enough. But please call it out it the commit message. -- Kirill A. Shutemov -- 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