Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp614677pxf; Thu, 18 Mar 2021 08:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvEusbcVL8GKnKpyQECcAQ2nsLjGEJvQxG/9B6NdEEhPS0i/Olcwiyeu44V4u6ah/XEWGc X-Received: by 2002:a17:906:2312:: with SMTP id l18mr42400049eja.468.1616079859147; Thu, 18 Mar 2021 08:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616079859; cv=none; d=google.com; s=arc-20160816; b=QNp9JTAg55/Q3++bphh5m3tN0HnfUzgrgm5PKf4KcysFf8eYBRGvbOFTAP3Ib7/kKz SbKsUmEEhXqiSQswSTuQnZY/XaQsS0QsFzUN2yvCKhVC+1z+LCAXMw4gCV8LTIHiHL6t i9tF11GzaLju1olF/GG6+hpuT6O2xt6AnO06NVGtAMGNi5hNcl+5Lp9GSUrHEIk4ouHj SzMCZo5Cr5eWW/qFfW5s0OU173LdlEb1LvFjkb65SE2YZyZiRcF9YYsDeBNqzEIoGJEU uhQVFSmOGJqf8QqzSRvgjy1NPXZ8ugbs2ur/V7pT7yvjUiAS9JAIXU+HbXjnlVEEHIIh GzZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ODku1sNI+qzXn1A0+oyYPRNoNufpW48D4xQgC/ecSb8=; b=I76lehuCzR6Qj8IOWK5BzZqHwLzlHdOaqH6XNg3bq6dzVT35d8oXdGkJ3lMXjl4kJT N5jo+tGfevlu5H9BB7jWT+d45HYfPQ8heMxTNpDTC+lqPkPxTlpKM3XZ2SyHwovrjEMm 21Cl5GtX9l7TP3C9AAL9xUHCRl2imVADsJ7AWxOfrM1T6shwizCTZK+dDuO5+BE9ZRfl qzghFzKtpPZLkTQLJUhcs/CjZqAkSPlimDQ+xTpu61X+v/oXygciQv0oW+wkzVOM0W+n 760RCuCE//WgMw6+impw0cHokHE+UtMgT+TVwHeqOBC21yHkNAnxEk9slDLHfkc71i8x Pw8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=hywKb9Je; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r22si1629379eds.172.2021.03.18.08.03.56; Thu, 18 Mar 2021 08:04:19 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=hywKb9Je; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbhCRPCx (ORCPT + 99 others); Thu, 18 Mar 2021 11:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbhCRPCU (ORCPT ); Thu, 18 Mar 2021 11:02:20 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 230FDC06175F for ; Thu, 18 Mar 2021 08:02:20 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id t4so2296065qkp.1 for ; Thu, 18 Mar 2021 08:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ODku1sNI+qzXn1A0+oyYPRNoNufpW48D4xQgC/ecSb8=; b=hywKb9JeRd9aGyWq9FNaxWtEEW+yd82HTdswTVDd+YNG4CK4ZnSRTzRkxPwIlz3Wvy vUYCvr9m0vMQnHTsXASTFTDUD3quCYQd9i5tW7wERWnJdNCkzr67eUw5wTX6qg17tofO 9RIb8wyrDa16vhsBdb2rZ68Ayv/cCciBiG1872zqL2E2adC+QLbEOFMixg2/K3jZEHJr JhI2uGgNAw1Z8EZKhaw9kxkZp1+2fdIJhxiq9F9xa/NdGrlZyijiKRnp1DmGv4d0ldn6 MmiSWRlu3ortORbGmJAt5W7Uvf/CRMcPBb+0uOhER92DsjeQfjpL7iqD81yoelklufuB KhXA== 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=ODku1sNI+qzXn1A0+oyYPRNoNufpW48D4xQgC/ecSb8=; b=BAx+MthcMriaZbcqdhc6COkmyaiJud6Ig6f5Nj6OfOE7pYtwW0NEvVXjC1IFd8fQ+u +tVfDWZjF7UPenRf0DqkgJ7/wb+szC4kGODpRGgpRARx4MNxmQOCPbdj5q2y/dzR35PE MYrUfH4KuAWxpD/y6bSipvTHQMFleT2itYSBrZahi51ThNWbls4HJXnRcN6eo47Cee+k X548efn0vv2qxhRCZ5q3OANFvkisbpLN7OXh+3Gg5IaQKOlLJm0WSu1BGf/wsZDvaZUo iqPW5cZuBqHIjFtxsgyJIFWhmZmsLRkcNkn0GL0kKlkaknf7Rc87H0q085PUfo6+AS5x Fzfw== X-Gm-Message-State: AOAM532wg0AenMtmFCjeqyn6AyGlI/YZWTWxjlylcnVljnoEbn8gU8T+ geeIIGPbcNU74HgODRAqLArLSA== X-Received: by 2002:a05:620a:4504:: with SMTP id t4mr4706137qkp.369.1616079739411; Thu, 18 Mar 2021 08:02:19 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:e46c]) by smtp.gmail.com with ESMTPSA id d10sm1947661qko.70.2021.03.18.08.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 08:02:18 -0700 (PDT) Date: Thu, 18 Mar 2021 11:02:17 -0400 From: Johannes Weiner To: Michal Hocko Cc: Shakeel Butt , Hugh Dickins , Roman Gushchin , Andrew Morton , Minchan Kim , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Heiko Carstens Subject: Re: [PATCH] memcg: set page->private before calling swap_readpage Message-ID: References: <20210318015959.2986837-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 18, 2021 at 03:01:25PM +0100, Michal Hocko wrote: > On Wed 17-03-21 18:59:59, Shakeel Butt wrote: > > The function swap_readpage() (and other functions it call) extracts swap > > entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel > > skips the swapcache and thus we need to manually set the page->private > > with the swap entry before calling swap_readpage(). > > One thing that is not really clear to me is whether/why this is only > needed with your patch. Can you expand a bit on that please? Maybe I am > just missing something obvious but I just do not see any connection. It was always needed, his original patch erroneously removed it.