Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3989946imm; Mon, 25 Jun 2018 07:59:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLTm/BwNiQDjw9k9Vm3jY6yX8mI5ng4gBH/NEWYjADMLLIt3KRgYkhI57Qme4t7rj4nhz2p X-Received: by 2002:a17:902:59d6:: with SMTP id d22-v6mr2913673plj.253.1529938741636; Mon, 25 Jun 2018 07:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529938741; cv=none; d=google.com; s=arc-20160816; b=ZbpdKMpZn4BmHu+vyvU/9PaToGWAwxuiPd9o0cgAcSz3oTqVxDa1wdsAwyVI4sNWKo vtXmSqOtmsVz4HNgQWmEQw73+cFlQhcSJusjA8HwuzuYZk5IS4BWNWkXfgmar3KJW0ra yHz89dcfkZUKeEWOK9P8jBSPvdIx4vp/ZMkgZdZuEhBJrG3ilsE+UQOdjy52WyyF4SIo RA1inMPQjfpHGaNjND0FLcTJj+sfSWq+lptGCLV8lhB38YEJd0EFxiGzVQCe69cC21yz Z7LO42OAwWaCLzPEVQVehQ5tZIdYWRNEw1rjb2PJydy7KHqCRaA5qdZPJ6nJiSYFqzPB yc1Q== 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:arc-authentication-results; bh=+w/zz7n6GSBmF81iZwDrgZMDsmvSSnGckleNx1Wj0f8=; b=O7c6JWnuN+712xELMGWya0IHV3YOVdH3PRKMLxrQ2Yuwz7yqAYP1s5ICij7hxhfThP La68jFW7HOY8VepdWoYhw9V73m7AY86j6c5NpIlQUfyPV9oqYogbZkdJB44V9tomkOb2 7YDA1Az86s/5cyhK0vTjuoWoKbr6APl0CcaYhBb1wVKlkHNeolq8QOjzcET7ubU8QhDY C4SSOoWJ/79IS/fibvckbcV3Xq/LuJP1Yya+Yakv2KzoRalPQZgFWNBZJi26Yj3qd9y8 QbfAXPMO5o40kFekoK81iCVchMzRuzv+HxVuq8DACs3IKwvmAa69Ga5X9ya+M/oQKNAP gDPw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4-v6si13431859plp.128.2018.06.25.07.58.47; Mon, 25 Jun 2018 07:59:01 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934678AbeFYO5f (ORCPT + 99 others); Mon, 25 Jun 2018 10:57:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:33150 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934416AbeFYO5e (ORCPT ); Mon, 25 Jun 2018 10:57:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7F2CAABBF; Mon, 25 Jun 2018 14:57:33 +0000 (UTC) Date: Mon, 25 Jun 2018 16:57:33 +0200 From: Michal Hocko To: Mikulas Patocka Cc: jing xia , Mike Snitzer , agk@redhat.com, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: dm bufio: Reduce dm_bufio_lock contention Message-ID: <20180625145733.GP28965@dhcp22.suse.cz> References: <20180622090151.GS10465@dhcp22.suse.cz> <20180622090935.GT10465@dhcp22.suse.cz> <20180622130524.GZ10465@dhcp22.suse.cz> <20180625090957.GF28965@dhcp22.suse.cz> <20180625141434.GO28965@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 25-06-18 10:42:30, Mikulas Patocka wrote: > > > On Mon, 25 Jun 2018, Michal Hocko wrote: > > > > And the throttling in dm-bufio prevents kswapd from making forward > > > progress, causing this situation... > > > > Which is what we have PF_THROTTLE_LESS for. Geez, do we have to go in > > circles like that? Are you even listening? > > > > [...] > > > > > And so what do you want to do to prevent block drivers from sleeping? > > > > use the existing means we have. > > -- > > Michal Hocko > > SUSE Labs > > So - do you want this patch? > > There is no behavior difference between changing the allocator (so that it > implies PF_THROTTLE_LESS for block drivers) and chaning all the block > drivers to explicitly set PF_THROTTLE_LESS. As long as you can reliably detect those users. And using gfp_mask is about the worst way to achieve that because users tend to be creative when it comes to using gfp mask. PF_THROTTLE_LESS in general is a way to tell the allocator that _you_ are the one to help the reclaim by cleaning data. > But if you insist that the allocator can't be changed, we have to repeat > the same code over and over again in the block drivers. I am not familiar with the patched code but mempool change at least makes sense (bvec_alloc seems to fallback to mempool which then makes sense as well). If others in md/ do the same thing I would just use current_restore_flags rather than open code it. Thanks! -- Michal Hocko SUSE Labs