Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1324552ybi; Sat, 27 Jul 2019 07:16:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcggsHED6OtdOIsL+QYX7cKY9maVE28ar1H3uDtbfugTb7rIFl5ggiQN4qyRw+s3ImEjqt X-Received: by 2002:a17:902:1102:: with SMTP id d2mr101423813pla.149.1564236998613; Sat, 27 Jul 2019 07:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564236998; cv=none; d=google.com; s=arc-20160816; b=VuYUuERY9lPDJn8VakDs0MeDOd0eif0ZUi7Q9fknubB8MYQ0eXj4wpGa2I/KlulVEM HwlDTSOomc90gPld/sKDdij7GoCzX6mvBFYQuXxTJ6NljfSyMH9BwBpYNhPBEyZG0t9i V5YWuu5EnbvhzHiu4xq734IHIPDJF/vT5ZjicJIvGglZ+UuErgJ6SV/6nuDme6pagpMF 4dNJg/PqB+h5v1GZEY3AdgDnsKkwpY/8eGPfAghJTzv993NXqa1c8rKD23Ed9YjPQ4Zy pmNyZZzQI+QokHNNkyeFDFIJtWo9YKi6HYuSQQMbLyLlHLsGdcN4bsUPAMFjibpffYWy Ek6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:openpgp:from:references:cc:to:subject; bh=6XmW/ccOBO5SD7TH1X9ltKTv5OmD4V9BFPTLsY0etLI=; b=NlBLfyToa4ULUflK7sSNuNz1c5NMBM4olIoR1sw2tC1hvDNjAQOhvZe9wX2BaOhs69 Y0iuezX5YYiouaWYFNLyQKTadN0zOf50nx65MU2mQE5JFOyGMb9LgsTOhYppD9oGnf4R WCVuBxQ/qXn+TgzAAQN+5fRfpinOI+lmW2BZRgmYfWmIURtG2qoPQwsNBbThP0cpdDv4 8l5/Y4B2UAzHv7AlHoFJuxrhpLooug7+7jW+BNzDz1wWi/mCPJTGLIYxn3p4NaXDeMt1 SDqkIMwLbS/q0nBsGu7LxPCvcuATjfGUTQyyQWFdU+OI6nb2Un22NySQ7lfPoV5O3d18 0Siw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si21297086pls.52.2019.07.27.07.16.23; Sat, 27 Jul 2019 07:16:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387728AbfG0ONb (ORCPT + 99 others); Sat, 27 Jul 2019 10:13:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:47880 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727589AbfG0ONa (ORCPT ); Sat, 27 Jul 2019 10:13:30 -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 BC17CACC4; Sat, 27 Jul 2019 14:13:29 +0000 (UTC) Subject: Re: [PATCH 2/3] bcache: use allocator reserves instead of watermarks To: Yaowei Bai , kent.overstreet@gmail.com Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org References: <1564222799-10603-1-git-send-email-baiyaowei@cmss.chinamobile.com> <1564222799-10603-2-git-send-email-baiyaowei@cmss.chinamobile.com> From: Coly Li Openpgp: preference=signencrypt Organization: SUSE Labs Message-ID: <4bc32702-9d83-1ac5-4c79-2d9e45123da8@suse.de> Date: Sat, 27 Jul 2019 22:13:22 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1564222799-10603-2-git-send-email-baiyaowei@cmss.chinamobile.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/7/27 6:19 下午, Yaowei Bai wrote: > Commit 78365411b344 ("bcache: Rework allocator reserves") introduced > allocator reserves and dropped watermarks, let's keep this consistent > to avoid confusing. > > Signed-off-by: Yaowei Bai It is OK to me, I will add it to my for-test. Thanks. Coly Li > --- > drivers/md/bcache/alloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c > index c22c260..609df38 100644 > --- a/drivers/md/bcache/alloc.c > +++ b/drivers/md/bcache/alloc.c > @@ -622,13 +622,13 @@ bool bch_alloc_sectors(struct cache_set *c, > spin_lock(&c->data_bucket_lock); > > while (!(b = pick_data_bucket(c, k, write_point, &alloc.key))) { > - unsigned int watermark = write_prio > + unsigned int reserve = write_prio > ? RESERVE_MOVINGGC > : RESERVE_NONE; > > spin_unlock(&c->data_bucket_lock); > > - if (bch_bucket_alloc_set(c, watermark, &alloc.key, 1, wait)) > + if (bch_bucket_alloc_set(c, reserve, &alloc.key, 1, wait)) > return false; > > spin_lock(&c->data_bucket_lock); >