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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 21DA9C433E0 for ; Thu, 18 Mar 2021 15:09:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEC9564F38 for ; Thu, 18 Mar 2021 15:09:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231694AbhCRPIu (ORCPT ); Thu, 18 Mar 2021 11:08:50 -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