Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1176849pxk; Fri, 2 Oct 2020 03:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8QV+SDQJhlbWPcos713NKbvWYAG2HjBPwntOuQhaiEEEOWUR/B6l5m1h7AfXla4PvzMRG X-Received: by 2002:aa7:d785:: with SMTP id s5mr1458304edq.154.1601633275822; Fri, 02 Oct 2020 03:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601633275; cv=none; d=google.com; s=arc-20160816; b=PkQyFmEk1ouC7Ps1FAzdSl7dsioFV1cqt4QdSvuPkPXd3+FQ98yzGiQroNJ7z6kZ5j U1lkBd3EZpecb+FBXuO54BI9uBvkOc4bPZrpai7Fz0ar++Q9mGX9Mn4W2KEx7S+q0dzW nONFrF+r/kaOcI4v4ZPF4vH6UAo5vTdlfrV0TSCAL5l/cV4q1p+Q+JSC7x4RIQ/P9UJc Y7X/t8Ai2rJpjAXcM4hoJUAAcNZWA6F7/8MRTENmrLVHYWGNSs5jO/zIu33f4SHFiiX5 w9+GDpJkVBGSsfDbmIYFMd1plxYeMKcLo71qAjUWX4lewBeJ/oHD5VAkiTF1mim0uNsW 6apQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xShwnns1sZmu50F4PGsDB78YoAb2/a84doWxwWdQAao=; b=CradEzjfeZXF3aX+8ls3EpJsNrZ0jqXy5WhTZRx08HU7pUevtJ4Id3u90m2aaHXNGh Cy+K2I0rlrh/50FO+TN7zaBUC+1kFrJp1NZrtKWcnWdASK3zOAzZ+iKee43BaKyv14qz jFUITFTOLf/jIAb6YHv8LLqYRjAu7Av93wyR/g9C7wLxfCrG+thbKZDR9uTT7byOP58p 2I4lmBh2N78sD4nDkh2R9lqLbo4CSSAo6mgQz6IAiPDuNV5yeouP5PQ0pk4s8jjQx8j3 vULnOF5c0UadR5/Ub9CeG5HgmDHDn1nO0MiaDVfKVO2cKWwNuyc4rocvQ323eW3qQ0cQ mQxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EO4uUzWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si608731edy.251.2020.10.02.03.07.33; Fri, 02 Oct 2020 03:07:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EO4uUzWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726569AbgJBKDy (ORCPT + 99 others); Fri, 2 Oct 2020 06:03:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:36300 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgJBKDx (ORCPT ); Fri, 2 Oct 2020 06:03:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601633032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xShwnns1sZmu50F4PGsDB78YoAb2/a84doWxwWdQAao=; b=EO4uUzWSbENtuiq0XnbdzwUPSfuTzfNHcZI8XZJjRguG48J0SrZxcdQiLcStNq9QTdKUGY 8S2T1NBlmqqWHSFC4s1DKW6giHm8i0xtJlmeLXVPK8bB8vNZx+I4f5HNJUu+hKxXAIRugf OXCcD4zK1aMsofHcbmD4kr4n6lmBuOw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 352C1AC2B; Fri, 2 Oct 2020 10:03:52 +0000 (UTC) Date: Fri, 2 Oct 2020 12:03:50 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Johannes Weiner Cc: Roman Gushchin , Andrew Morton , Shakeel Butt , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH v4 4/4] mm: convert page kmemcg type to a page memcg flag Message-ID: <20201002100350.GC24008@blackbody.suse.cz> References: <20201001002710.748166-1-guro@fb.com> <20201001002710.748166-5-guro@fb.com> <20201001170036.GA29848@blackbook> <20201001172713.GA500308@cmpxchg.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MnLPg7ZWsaic7Fhd" Content-Disposition: inline In-Reply-To: <20201001172713.GA500308@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --MnLPg7ZWsaic7Fhd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 01, 2020 at 01:27:13PM -0400, Johannes Weiner wrote: > The activation code is the only path where page migration is not > excluded. Because unlike with page state statistics, we don't really > mind a race when counting an activation event. Thanks for the explanation. I see why the accessor trio is justified. > I do think there is a bug, though: mem_cgroup_move_account() should > use WRITE_ONCE() on page->mem_cgroup. If this were a bug, wouldn't be the proper approach rcu_assign_pointer()/rcu_dereference() pair? Michal --MnLPg7ZWsaic7Fhd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl92+wMACgkQia1+riC5 qSjoXBAAijzh02/9TXGICO7j+GMJCp6nN4wR6sLgCwSepvipg9XWa14yJiDqRzy1 hHVRStm2iKcS3jGsCWsz0qvE+k9CDosua5asddxwfQXWggJszaTzkrTEkBIj/iIW jFR8sMzmgfHSIo+m93FvRT/QHoZC1s4+J/PauBwvUwCLN0kB6/V964HIbt+m6zKO xAzczqa6H/JMFPovVu6gGguT8dZqA847COfuD3+J8ZkK3ZUTu74epXEAjJarkokQ ibkZwuEVOzqoB3CuCugb2dO0W6bqcFXqZw6T4V1FG54QwpoBiq9/kGcG7Z3djIr2 15kRQIbE7JqtLJQMYD+oXbLpKoUUXXZkuhUNWh8ozrX5m4kBeXkIeOpCEZlHqYrH Mc8ydvwx+Ajy0oofmDqqNKd8aV/9bBAVQpqxsZD/fRjIzkaT20HQnTMtK6UgnsH4 2gw5NCGv0EiCEBhpdWIlwFoaNMOinYeZwr+nPVK4WZLSyZZyPcBFdIW+7O7WkfPK n39mmmngFevD/EP2iCyC8hhZ6Uht+qVeVHVpHKvE82NgrDfUSuhoKbJBNoYQrIV3 57MLMrP/RACcxU/3D06asMPg08k36b3yV5TuSDcu3E/PlLpZnwlQEblws8+120/k xKEnW1XoA2zRaOB1ojkNy+YcyBOlmdPFMRjAgKffEc4U6wZbNcw= =Qjsf -----END PGP SIGNATURE----- --MnLPg7ZWsaic7Fhd--