From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D998C433E0 for ; Thu, 11 Jun 2020 09:40:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 08A48207C3 for ; Thu, 11 Jun 2020 09:40:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08A48207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9C61A8D008F; Thu, 11 Jun 2020 05:40:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 976DB8D0084; Thu, 11 Jun 2020 05:40:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 865308D008F; Thu, 11 Jun 2020 05:40:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 6B4D48D0084 for ; Thu, 11 Jun 2020 05:40:37 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 26B10181ABE9F for ; Thu, 11 Jun 2020 09:40:37 +0000 (UTC) X-FDA: 76916436114.01.noise52_3a155d926dd2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id E1AE1180804E3 for ; Thu, 11 Jun 2020 09:40:36 +0000 (UTC) X-HE-Tag: noise52_3a155d926dd2 X-Filterd-Recvd-Size: 3794 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 11 Jun 2020 09:40:36 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id l26so4346463wme.3 for ; Thu, 11 Jun 2020 02:40:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=A7As6uSYKJIDVnQAAEPQVgwwIZgTE5NFEu/RzVDwggs=; b=JZmdv1Xggqsi1O51mKsKBL0vRX+kyDDweYLjClHCAImO8LLgEkdP3iSZouIYX2N/RL TzPKRss3cyDtY6AjCAcFU4Mi7CkP8KREtsKVxlRxSHItkrxTp4iCN6izw399CCnlVFJU NISYRKRyKDQ9nrOyh3ANuTpXfQpAKmR6lPVigCi12srxOzcKcS0zaEz38TAzXC1bGXzz 5i6cdjG+rLAMae5vj1/WPzMCwc6pEK6K5cNo9luoeTZPsV9K5aOqWzpJh47fsxjvaEsW FZ0nr9MKKjZC74XylS511SX6koJDszb0y9ges1Z7hdqN2tqzqnnM8eygzuZ1P+Iq0Mk/ ylNA== X-Gm-Message-State: AOAM532IYVM/iT49dEYva9YYud0ufqurKsFyjYhWNNPNlefoVRhNAHck OvmIUWdJrywVLmlZHwWKPDo= X-Google-Smtp-Source: ABdhPJwKYxLynBYWf8bE86R5FOu50icX4WssBi61qH6gatM5hr/CP871z4VLtTkF+IP90VD5efX2fg== X-Received: by 2002:a7b:c212:: with SMTP id x18mr7262406wmi.119.1591868435507; Thu, 11 Jun 2020 02:40:35 -0700 (PDT) Received: from localhost (ip-37-188-174-201.eurotel.cz. [37.188.174.201]) by smtp.gmail.com with ESMTPSA id l2sm4040320wru.58.2020.06.11.02.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 02:40:34 -0700 (PDT) Date: Thu, 11 Jun 2020 11:40:33 +0200 From: Michal Hocko To: Johannes Weiner Cc: Andrew Morton , Alex Shi , Joonsoo Kim , Shakeel Butt , Hugh Dickins , "Kirill A. Shutemov" , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 19/19] mm: memcontrol: update page->mem_cgroup stability rules Message-ID: <20200611094033.GC20450@dhcp22.suse.cz> References: <20200508183105.225460-1-hannes@cmpxchg.org> <20200508183105.225460-20-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508183105.225460-20-hannes@cmpxchg.org> X-Rspamd-Queue-Id: E1AE1180804E3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 08-05-20 14:31:06, Johannes Weiner wrote: > The previous patches have simplified the access rules around > page->mem_cgroup somewhat: > > 1. We never change page->mem_cgroup while the page is isolated by > somebody else. This was by far the biggest exception to our rules > and it didn't stop at lock_page() or lock_page_memcg(). > > 2. We charge pages before they get put into page tables now, so the > somewhat fishy rule about "can be in page table as long as it's > still locked" is now gone and boiled down to having an exclusive > reference to the page. > > Document the new rules. Any of the following will stabilize the > page->mem_cgroup association: > > - the page lock > - LRU isolation > - lock_page_memcg() > - exclusive access to the page > > Signed-off-by: Johannes Weiner > Reviewed-by: Alex Shi > Reviewed-by: Joonsoo Kim Thanks a lot this is a big improvement and simplification. I have gone through the whole series finally. I have followed up where necessary but overall this is really nice! Sorry I couldn't jump in to review in time. -- Michal Hocko SUSE Labs