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=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 BC58BC432C0 for ; Sun, 17 Nov 2019 11:03:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80B23206D6 for ; Sun, 17 Nov 2019 11:03:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jJEJMNfR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80B23206D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0B4126B0007; Sun, 17 Nov 2019 06:03:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 063FE6B0008; Sun, 17 Nov 2019 06:03:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6E866B000A; Sun, 17 Nov 2019 06:03:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0118.hostedemail.com [216.40.44.118]) by kanga.kvack.org (Postfix) with ESMTP id D04266B0007 for ; Sun, 17 Nov 2019 06:03:23 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 56CA2180AD807 for ; Sun, 17 Nov 2019 11:03:23 +0000 (UTC) X-FDA: 76165483086.09.event85_57b98d8f0b43b X-HE-Tag: event85_57b98d8f0b43b X-Filterd-Recvd-Size: 4246 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Sun, 17 Nov 2019 11:03:22 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id w8so664018pjh.11 for ; Sun, 17 Nov 2019 03:03:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oidSitOSx3wz/zOT9+cz4soIOB6y/ZqJ5xkv2u37mMg=; b=jJEJMNfRpHtXmJckbTZB9ZNHCq2xiXBw90gY9gIbEXxRovl7hLntxcbbaAJAf2ud+b MXSNvcdZDb+0nshW/ucfoHsxQ8QRBHxgRSL5szZH88Wyc09iVGespARjnFZ+xtCUCsX4 QeAd9DLUmgCNls3d3COIAwF12Lgg3kyUymoZejLgB9wVH8w6evTKORKdk+n2d5Jftvcc FPi2UbmDvlAMhMpG6uftA5lkaa/oMW3HLrOKZHXfX9i8BLGQF/9S3WakXBP3t1bJi7+u HaMNelmGG9FA6kvTeLFdgDEtFNwk5rBux4rm6+hvJms+0BAmsI1d43UY0aYqS79CZYDL tCeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oidSitOSx3wz/zOT9+cz4soIOB6y/ZqJ5xkv2u37mMg=; b=k5QXRqK9Y0AhsTa4UEH39aF5nZq/ryhmBhgs4tbeMOK2wEmdAE2LGZFydDkrnzIkbk KjMSUz/HNgzkwVrvUeYKL/i1C6uNLvaNpei9idHwDc8BpRALAJNSkR9HhRVcaA+l9BeF aUe+HTIjMpwzn0uJsNMndZRrYXXCiaEhOiWFN6jXpfmbFFKVkFJu52zQAs6diuKtLBeY GWHuKyOkB/Pij266CEhwh1QSI7rlSgo3qwiZ7d+yvu2wIg7LCBR81acD7/IZMYzBVSm0 xyXGvLbuNBDuS6wdiNWneuicm53fCEa0a+HJreFU46fS2scDpuPEBG5Ex/AoJghnVMlv 5/Ug== X-Gm-Message-State: APjAAAWR+hdaEtYIapDg/WU3ZyiD1wkQH6m76gy2Wh+N0jjls+iQL5J5 lX+NCSTZr2W2d3jUXMrDFw== X-Google-Smtp-Source: APXvYqx+d4UcV0qPDI11BREyaM8WXS2PpgQ5hEDrsy14K2J9lpPJH9GED3bAD68F8Q4kG1EIrj8SUg== X-Received: by 2002:a17:90a:cc18:: with SMTP id b24mr30970268pju.141.1573988601826; Sun, 17 Nov 2019 03:03:21 -0800 (PST) Received: from [172.24.28.130] ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id w2sm18153667pfj.22.2019.11.17.03.03.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Nov 2019 03:03:21 -0800 (PST) Subject: Re: [PATCH v8 5/9] hugetlb: disable region_add file_region coalescing To: Mina Almasry , mike.kravetz@oracle.com Cc: shuah@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, aneesh.kumar@linux.vnet.ibm.com References: <20191030013701.39647-1-almasrymina@google.com> <20191030013701.39647-5-almasrymina@google.com> From: Wenkuan Wang Message-ID: <010d5a90-3ebf-30e5-8829-a61f01b6f620@gmail.com> Date: Sun, 17 Nov 2019 19:03:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191030013701.39647-5-almasrymina@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000228, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/30/19 9:36 AM, Mina Almasry wrote: > /* Must be called with resv->lock held. Calling this with count_only == true > * will count the number of pages to be added but will not modify the linked > - * list. > + * list. If regions_needed != NULL and count_only == true, then regions_needed > + * will indicate the number of file_regions needed in the cache to carry out to > + * add the regions for this range. > */ > static long add_reservation_in_range(struct resv_map *resv, long f, long t, Hi Mina, Would you please share which tree this patch set used? this patch 5/9 can't be applied with Linus's tree and add_reservation_in_range can't be found. Thanks Wenkuan > - bool count_only) > + long *regions_needed, bool count_only) > { > - long chg = 0; > + long add = 0; > struct list_head *head = &resv->regions; > + long last_accounted_offset = f; > struct file_region *rg = NULL, *trg = NULL, *nrg = NULL; > - /* Locate the region we are before or