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.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 1C3B9C10F14 for ; Thu, 10 Oct 2019 19:17:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C74FB21835 for ; Thu, 10 Oct 2019 19:17:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="PvwDm7H6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C74FB21835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 462698E0005; Thu, 10 Oct 2019 15:17:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 413148E0003; Thu, 10 Oct 2019 15:17:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 301E08E0005; Thu, 10 Oct 2019 15:17:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 0B5AB8E0003 for ; Thu, 10 Oct 2019 15:17:51 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 930BB181AC9AE for ; Thu, 10 Oct 2019 19:17:50 +0000 (UTC) X-FDA: 76028834700.28.board50_a314c9aeba03 X-HE-Tag: board50_a314c9aeba03 X-Filterd-Recvd-Size: 4007 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Oct 2019 19:17:49 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id m15so10360284qtq.2 for ; Thu, 10 Oct 2019 12:17:49 -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:user-agent; bh=RhQju8RSX07X/KnjD6CK8YnuWTUpQtspCzjfwZGuOhk=; b=PvwDm7H6HDBExq/gmUBt13lPhyKR/mgpHs8Mp+C5e1/x5SsdvexdpLWoCW1+BbuBsi 9GmgxDCbnVHwTk6TcxzVDYzg3ELkIG9uos1dIaCDVYM+H3/LAuEfDWDXj8sbM9U3qmpe ZRGAfahHFT1ObtaLAr+Uv/Oys5uSCULZwsdS4Xjw8w0K2vGWmUXfSv3vXiJYNmjSCjVM 9JqKJnHHrv6CdljGbcTW3icNAohfImi1hNNR3RAs5LYauyctKUtYjA1zkGmPOw32FHXd dONuG25Ei04i3iQ9j8Rnwl3Bk498NeT/0PNaX1jMmgYAFgBXVE/46+7R/TArsKWitKXU HbXA== 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:user-agent; bh=RhQju8RSX07X/KnjD6CK8YnuWTUpQtspCzjfwZGuOhk=; b=HwlWU4Szj6BjLVvpOjbcVevV4/Vq28SZ0kdap73/MRdcRJkcdQux4e3Cd7/4BdRiLw 6FQD2jknqYv4902iS8CaPGKpidCKjzxDU7g7JmWxAz1knknq1s6hdqj4eVoPUJS0P4Dz M4lmxIYpQC/jjy+nM18XrzwRVIQTGDVs64oShTdaZYyG7p7//wsfFn3zjEhPqJ+OBXLR ymuUcLiA8Pnd/AcCVuSTesJrpLBDPB+6S55LASxjm5BxekevNCFBHy54khESaR6nCxy1 BmX2s/S/XudPR/0s8CiXdPeXdwcquMoXpnndYaVvIicNNf8oXTDwLA8UwMHxvWeg771J TTmg== X-Gm-Message-State: APjAAAUbrdcihCY44Bonkbn8e600tO3FBZdv+30qKbVJTq3EZHMInP5f sp6eG/0cSg6zro4z/fzmExuX0w== X-Google-Smtp-Source: APXvYqybrZtK1L3jhtfN1BIES5a18iOJ8xFgfAHJUOneTuarK99XYY9CQ+HwMbhvIfFGijkAVyYgvg== X-Received: by 2002:ac8:1413:: with SMTP id k19mr12735251qtj.360.1570735069216; Thu, 10 Oct 2019 12:17:49 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::1:39d1]) by smtp.gmail.com with ESMTPSA id t64sm3120186qkc.70.2019.10.10.12.17.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 12:17:48 -0700 (PDT) Date: Thu, 10 Oct 2019 15:17:47 -0400 From: Johannes Weiner To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Sahkeel Butt , Minchan Kim Subject: Re: [PATCH] mm: annotate refault stalls from swap_readpage Message-ID: <20191010191747.GA31673@cmpxchg.org> References: <20191010152134.38545-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010152134.38545-1-minchan@kernel.org> User-Agent: Mutt/1.12.2 (2019-09-21) 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 Thu, Oct 10, 2019 at 08:21:34AM -0700, Minchan Kim wrote: > From: Minchan Kim > > If block device supports rw_page operation, it doesn't submit bio > so annotation in submit_bio for refault stall doesn't work. > It happens with zram in android, especially swap read path which > could consume CPU cycle for decompress. It is also a problem for > zswap which uses frontswap. > > Annotate swap_readpage() to account the synchronous IO overhead > to prevent underreport memory pressure. > > Cc: Johannes Weiner > Signed-off-by: Minchan Kim Acked-by: Johannes Weiner Can you please add a comment to the caller? Lifted from submit_bio(): /* * Count submission time as memory stall. When the device is * congested, or the submitting cgroup IO-throttled, * submission can be a significant part of overall IO time. */