Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3903110ybi; Mon, 29 Jul 2019 15:01:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMvFyYw4+oWjlXbbOYljYjtke9J9yL1Yh4gDKTEBpib/kueXb+Ty+/6w2iT6Us/A5UEZQ6 X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr110963276plb.295.1564437708318; Mon, 29 Jul 2019 15:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564437708; cv=none; d=google.com; s=arc-20160816; b=GukFStcHKQdMipScsH/pd4a5/Ha/QA6cJRE678wOYIW47+8p+yLc0rU/WK5GYjw0sN KYe7093XAiLLu7lCHBW1O5xMGAmcxkNLEPiYwZO2YRwrqwVke+ekjUCmDlPfj8i++fRB vMLc+MTKGNhvxovli2yOr/3Qt9YIOKS5rba1SA24vzoNWn/05gJKgu05CEl+Njmlt43Q vTZFwybgXUvd2cIgxoNQfEOJKdoTwv6n2vc7seD5moeIxWvG1dZHD3IWNIVDMeTf0EVO EXGJB/6RPL97XNf6Qyjsre1azVUGxCotRzxDD0w9Uvc3TVIrBM60lSuKMkA1BRoBHxJ6 griA== 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; bh=ebiMmFpcYrTi8rFUlWJ+SAT01iyu2ulaAIqkNqjfGCI=; b=BIyz+/u09KSSjcXbZge+2H95vDivLY+nP8mhmPRmFXjrX81R9f4w9xkUGQA5aDuikE xz94h4X9LlAdsu/ZwqLwShcCZAiAupG1yo1ApI1II2JRoNPyqnmCGmhFVSqxrwbMRKvH gPw0GaAonWVvnRGhCXKYd1rZ66r4RLrdaUBH/cSyVe24pocGUAbGhK7gD/zhjnLiGOj4 0da1v/uSmjlZldij++Ft/m4r4S0xmMriwwq9rl/EeoVjLXrEcwoZtcxHkf9aVNXXnsLe 3qCsTF1YMHDwdsUu8jSNJpTd/9s0+V7Nj0jO89+mqGiWKfIl8r1+dv78udwiUKy3xTNJ M8gQ== 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 u7si28909046pgb.103.2019.07.29.15.01.33; Mon, 29 Jul 2019 15:01:48 -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 S2388248AbfG2Ssx (ORCPT + 99 others); Mon, 29 Jul 2019 14:48:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:54776 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725894AbfG2Ssx (ORCPT ); Mon, 29 Jul 2019 14:48:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CB20FAEFD; Mon, 29 Jul 2019 18:48:51 +0000 (UTC) Date: Mon, 29 Jul 2019 20:48:50 +0200 From: Michal Hocko To: Yang Shi Cc: Konstantin Khlebnikov , Linux MM , Linux Kernel Mailing List , cgroups@vger.kernel.org, Vladimir Davydov , Johannes Weiner Subject: Re: [PATCH RFC] mm/memcontrol: reclaim severe usage over high limit in get_user_pages loop Message-ID: <20190729184850.GH9330@dhcp22.suse.cz> References: <156431697805.3170.6377599347542228221.stgit@buzz> <20190729091738.GF9330@dhcp22.suse.cz> <3d6fc779-2081-ba4b-22cf-be701d617bb4@yandex-team.ru> <20190729103307.GG9330@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 29-07-19 10:28:43, Yang Shi wrote: [...] > I don't worry too much about scale since the scale issue is not unique > to background reclaim, direct reclaim may run into the same problem. Just to clarify. By scaling problem I mean 1:1 kswapd thread to memcg. You can have thousands of memcgs and I do not think we really do want to create one kswapd for each. Once we have a kswapd thread pool then we get into a tricky land where a determinism/fairness would be non trivial to achieve. Direct reclaim, on the other hand is bound by the workload itself. -- Michal Hocko SUSE Labs