Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp622221pxf; Thu, 18 Mar 2021 08:10:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj+KTKZ0vGD+OyB+jBDZRXQod8116ekf+qDam1/ZyJ3zLJnJJ6pbKioBFirQhNJmSMReCU X-Received: by 2002:a17:907:1692:: with SMTP id hc18mr41127284ejc.265.1616080238889; Thu, 18 Mar 2021 08:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616080238; cv=none; d=google.com; s=arc-20160816; b=MS2wLXVczmVNzPPR3/MAHrrgaX0zXNIHLPGnYl8BeEmU07A+7UvXSX8jYmIsx3as1w lrMK6jekr6NSQXsjg4ZqiaqRGwCMDXXAP/1Skh9iU+wcDCjVxWeXKVKDN1FB/hmOdFHR x22SkVslRWrfOsQToGIGbO6sRSGWTDSlBdTYnYSUXN4nMHAu66UhWvXEjOBkVyJNT7+n /6ZfkmnfkreBL/N+JgvfMv+fSwU06X/I4giFzABLbVMQ1v1Wd1zYQJT3gJVDe7Niwf2i zeZoOOv3WMg9hI9uc2yf1fNpbEkjRsFgdJ+WL8vh7lgLtOw1X6NItHWnz3O0C3uH2ORb 46Ig== 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=ncUCz/9q/k7wrnyqgIPb09YysKbcmuYLpNaPVidiTuU=; b=0kQ4HmAGco/n1WS0XufCTyYYLpsnY6z/ztm2X6L6enV5kZGpmdUsufI6M0cxYbSik1 8eZkVNgJMCFzxvhyMWeGLLdj2nsd0vAlD4r1T4D4Qh4y+mdlbdmOUcFasQebJLAmX9Np plFANskLt0eI1iKZ55lVnhXT8RxUcStfx3tyOR+lPv+/LYssgok5FaKW3Kv1Fz46ljJy 6FNtQnj+i2k9Gs15LfOyjCDVIGRVCexEJyQuuAhU5kWlzCLD8jf8wbmEN9RZEFRTm1PL S4E+z10AZKcQWwKITluYZhCN/oNp6FU+gfZOUK7YcMUJv++Ph/fQw1VjVf+31UZ2jhad u9rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Suk1paUY; 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=QUARANTINE 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 h18si1831941ejd.89.2021.03.18.08.10.16; Thu, 18 Mar 2021 08:10:38 -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=Suk1paUY; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231305AbhCRPIt (ORCPT + 99 others); Thu, 18 Mar 2021 11:08:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:46802 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbhCRPIW (ORCPT ); Thu, 18 Mar 2021 11:08:22 -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=1616080100; h=from:from:reply-to: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=ncUCz/9q/k7wrnyqgIPb09YysKbcmuYLpNaPVidiTuU=; b=Suk1paUYjB0Y8cnUmQ8NVFYyG6SX9/QLobkqEIZr158GOH259BZArwdugjKK5FUeytaqgW gY8gdp13UnN20DRnZyaeOL5vIGxodkIGAX1gKiVkCPz1Ozfix8V1pbh09M34mx08PFFQto JHLvU3P1lMc/pIKWzAZapeYuZ2ADMtY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 85C51AB8C; Thu, 18 Mar 2021 15:08:20 +0000 (UTC) Date: Thu, 18 Mar 2021 16:08:19 +0100 From: Michal Hocko To: Johannes Weiner 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 18-03-21 11:02:17, Johannes Weiner wrote: > 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. Ahh, I can see it now. I must have been blind. Thanks! -- Michal Hocko SUSE Labs