Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2769635ybp; Thu, 10 Oct 2019 12:18:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZtKG9LYZ+3FdSkScQdX/Kul/DVqSOeMS3K/d2+08ncbXEA6EGn8XNRkdUr5tdb8Ajjy4N X-Received: by 2002:a17:906:1690:: with SMTP id s16mr9764787ejd.294.1570735122786; Thu, 10 Oct 2019 12:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570735122; cv=none; d=google.com; s=arc-20160816; b=UnqVmrgqvWVfwD0ixLejfIszG+PgdmAk9PKGpy+UhDhfCOl1y0hMw/XYRhdRRZ3d4n B53lqWHY7+Aw1pUAGDpfWLK2/CODyzWTgcTmVQC2OPv3T+n2YWoWYsZ24Cerd0cEdtm5 OtRnSVum9dOPnX92mVmADpdo744B1AkBVCX35U9Alee45BbQKFD5tBGQ+rwsE8I2Dcvh mdI9kuBTuBwR9zvR8zeVy4cIRN/tUQHPa4/cNFqtm2NFaF0bOrR2Dtj8N5+HwnyzLNUC 6Wnqc2BFUU1qjUp7Y9sujmHXQP2tECz4NyMlg50gQeuBq60BPiHAtXJmQPv8CVdBVbV9 R2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RhQju8RSX07X/KnjD6CK8YnuWTUpQtspCzjfwZGuOhk=; b=Xfwhz9q0eOA49rM2IT7au+8HC8m2q9rY5IrNLbXNqtmPiv8J7WVqqZUBdCAw6NIN4E 65ZOE5aIb1c9HuCN6FWtrbTLoZKeZFaaPglJ+3vh3OYMGDMIo4FKKft7S4/+U1qULNYD UGC6pDYe8hI7+Or02dC+z73MYaSJdnFDOcf94Ycfeg61SHuVjbSu7ZOopm/n1ZHQZC2z qvOxcK9BOrbQ/WMDHb/cKlMu5sSjWbtPfOyevk6yBKWp9+1mZmhCsZa/8qtyAUHTkj1L w3GBiKxg1disE0OEFla2fU5Qx7Zw8GL4aphsOqrGMUoNrZMfqp5tlibdIlQ+kssR13vo 0Kyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=PvwDm7H6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p28si3762425ejn.88.2019.10.10.12.18.19; Thu, 10 Oct 2019 12:18:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=PvwDm7H6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727125AbfJJTRu (ORCPT + 99 others); Thu, 10 Oct 2019 15:17:50 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37313 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfJJTRu (ORCPT ); Thu, 10 Oct 2019 15:17:50 -0400 Received: by mail-qt1-f193.google.com with SMTP id l51so10065905qtc.4 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=kXWsPrXxSHDdrRDmw9RMQfdERKVlYv42mrpnP3tZidY6DzWgqXpZw/svkpZXzmOo1Y I2UZCKEwQXQkCG2/NYDM/rgA7AWp2DyHwcEsQl4v76KBJn11NSPBqPs3kC738rX1jmHi fOSxxd3D2B13C9iYAONqp7Aa6msfGq9uSm7p351cD+q5gQqKEgn6vY5ktNUFbBmk55m8 w1xAQjetP5JOwGJ4gtX/LpHvU4ymM/WQyMZHSC5seoapwSWXzt41bVrAAMa3acQ/0tdO yWQQ5JEPFaw/pzc3JnsQsVVdOE7C4xNirH+3AH5t1kk5cVZ45ZBSn8cBwJtha4QU9CwD xBDg== X-Gm-Message-State: APjAAAXLAGOChZf3XZHTWyL0q+6fWhCRSQUQB9WApFrbsWmXYR5c0YCJ 4TnLjUAZpWbqMJIKrmNbhU79gQ== 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. */