Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp3960177pjo; Tue, 3 Mar 2020 10:07:28 -0800 (PST) X-Google-Smtp-Source: ADFU+vtyJMmAPlPm4trxlbDtQcciJ3x+WGqlUb1fiSqbIfL0wZNiFU4A20XvQs+ssgYsFjxgLg1W X-Received: by 2002:aca:f5c7:: with SMTP id t190mr3209236oih.36.1583258848639; Tue, 03 Mar 2020 10:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583258848; cv=none; d=google.com; s=arc-20160816; b=d82+i9CaxMDB+9TN+CCRKvPzLnj8G8XU4SHkeumwqOIC34+RvTXAYMgOAh3e6g59yL 7QeuXu8wrKfi6SabPZphMGz+UjlarGiFQR9j9//0sS6NRf/6gbYuc8MEWeWqYJoYdOpE QG4k5xyF3KQyXc3X1uItcgrVB2Ne18bJq94QFWFTI4nafdiR5P1xTs71Tii+GSDpm7tA Bur3EMz7U9ytt0WGAnkMdkQgZR53ABPAA+Cpnk9IV6wFGcXNV+ETA9cDAFesu05icpOW B/2yerfH6zjiUQJ1hAZfPoQev8pGlGhMGgP2ooz3UaMY+BxgSf1j+Fo/vi3nM+wvDnLU xyxA== 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:from:references:cc:to:subject:dkim-signature; bh=G5nat7TjfwsYKukhiu6yJ6peKaEgkq8tBpj9OwyiAts=; b=IzNct6Ld99UXdXVlqyLpbIbIe+NipfbsvROUNKKq+ThDS/4/BNeN4kJS9zMvFmOzVP /+ZwI+i7Eme/MMcgLWDZC3fSvK0j1KTpFrUxPOG8mfQyEcwxJN7PDvz4gVtMhJ134y/B 31FiCRJ/jxhEYThW0hvml5Gk+AhPxftrQcAYa/OTN4qdq+tn6Fol2VU47Qa/eZu4HDvq OTo1wIXmB2TZmtnlW3nKYdBa4wudro3bLYLuJmNJ3+q78kPpoZNYX22fLFETH8U2NxFJ NbVfviAm9RQFf0h4AasL5MhmG5UGgW61rj+oRND4+TmzqrnZn9xasel4j4//ltD8w6Wl f4+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1BVMSz5o; 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 v5si5948647ota.39.2020.03.03.10.07.16; Tue, 03 Mar 2020 10:07:28 -0800 (PST) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1BVMSz5o; 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 S2388194AbgCCSFP (ORCPT + 99 others); Tue, 3 Mar 2020 13:05:15 -0500 Received: from mail-il1-f195.google.com ([209.85.166.195]:46956 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387409AbgCCR6b (ORCPT ); Tue, 3 Mar 2020 12:58:31 -0500 Received: by mail-il1-f195.google.com with SMTP id e8so3518245ilc.13 for ; Tue, 03 Mar 2020 09:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G5nat7TjfwsYKukhiu6yJ6peKaEgkq8tBpj9OwyiAts=; b=1BVMSz5op5aH4SjFm/0AsfcMaTUcTjYDE6RYQdIeeh6bJpDEvM4lczmgOBYIgehYU6 3wROaS6Xl/bSaiSQf1ruWmaWuuF7FyuSv7ZRENnxDrZxheVkOjHnLQ/GNJEQR6lM2VMp koVVCUE6aU9BJMHhq9kh3VRjDq/M2GUjetqQFWni8tEoSBPcIpKb/zSSIGmjFAU8NrFZ k9n15D7kPTkUMdfLUV+6X4ZmzIunA0Bdsim+Bap2Su7dPEHZWa8OxFn7XfKDdc1KYiFZ W681UKO6qansKW5nNWQcDpAYHf2w6E0cACcLMNMmocdS+Fkal/VR09QiiT4H4Y3s67uc vMJg== 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=G5nat7TjfwsYKukhiu6yJ6peKaEgkq8tBpj9OwyiAts=; b=bbdRqlV2XtttjWG9s/pXgJhWT2irF70MCoWv+KcZ7ov+lfvIX4i93yqsH+Gl0P8/nG /3q8qiB649Wdefy7EOqolWIe5KsLoWVHLTqGvgzVoBw5hcV70kZW91BQMFnzU23tWVww QgtMZoCPu0lqOJzFUhtJbP+Gms3/HT/GFIFGcdkfvsmtqsVJ32VFFCy++jKQQjVl8IDS rrBZDbVznSkZxQvmALGVuCSUnY1yBonMaLivvOHZk+Xb2C1zlbTxNngd8cd1cyq2qywa Qcn4jRmuWMoUFxIyKgwIKQMxmb2b8M6MysKC5WtNsVl61bi+UZKGUhmxnkSY8GPAjsES YKpA== X-Gm-Message-State: ANhLgQ3sZIyXmG2OysGETqQzfQfuin0x+YDsk8xDs/IEtonUX+ukujR5 LAactQtc0yl6hc9dHKVGwtDDTA== X-Received: by 2002:a92:de03:: with SMTP id x3mr5968538ilm.146.1583258310639; Tue, 03 Mar 2020 09:58:30 -0800 (PST) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id k16sm8140521ili.35.2020.03.03.09.58.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2020 09:58:30 -0800 (PST) Subject: Re: [PATCH 5.5 072/176] bcache: ignore pending signals when creating gc and allocator thread To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Coly Li , Sasha Levin References: <20200303174304.593872177@linuxfoundation.org> <20200303174312.994115258@linuxfoundation.org> From: Jens Axboe Message-ID: <24e19cd9-8eea-a41a-27f7-84ffcd872977@kernel.dk> Date: Tue, 3 Mar 2020 10:58:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200303174312.994115258@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/3/20 10:42 AM, Greg Kroah-Hartman wrote: > From: Coly Li > > [ Upstream commit 0b96da639a4874311e9b5156405f69ef9fc3bef8 ] > > When run a cache set, all the bcache btree node of this cache set will > be checked by bch_btree_check(). If the bcache btree is very large, > iterating all the btree nodes will occupy too much system memory and > the bcache registering process might be selected and killed by system > OOM killer. kthread_run() will fail if current process has pending > signal, therefore the kthread creating in run_cache_set() for gc and > allocator kernel threads are very probably failed for a very large > bcache btree. > > Indeed such OOM is safe and the registering process will exit after > the registration done. Therefore this patch flushes pending signals > during the cache set start up, specificly in bch_cache_allocator_start() > and bch_gc_thread_start(), to make sure run_cache_set() won't fail for > large cahced data set. Ditto this one, of course. Did someone send this in for stable? It's not marked stable in the original commit. -- Jens Axboe