Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp372770ybe; Wed, 4 Sep 2019 00:44:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBHqLLBudlpuW9ahE8G3A/bXfLyTxq4X4HdRHXBfzbDmhzodIgFLkUKQbJQceR02dL6Udv X-Received: by 2002:a17:90a:9f05:: with SMTP id n5mr3491810pjp.103.1567583063562; Wed, 04 Sep 2019 00:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567583063; cv=none; d=google.com; s=arc-20160816; b=YATGGrv3FSu7po1AXT4G4JH4FYR7b8wAYGe12/5QB07pgXYZHpeR4XBHPGFo2zv299 GgzyjieBPll+nOi8tBV1RFUP+WEFCexEnU6v435lhXUg3NEK9iGOIqE9URm1qsybT9/H +zBKvdjNrNrV25S+L6WhaWbMD7RSZ8pxBP30EQIAkXlmw8bzYkOWxKabi6PVecJjLLt/ oE2D3MDqdMYBAiOJz+Xzq3/Ew48EchiYRV3uNzpjGTzsMQ2wyA0bIdOJTTiNV6XL+JTY razlr1anybtO8FG0SMIVX1bs5I3V7mTSrpYVB0vgMC9eIaCXhhXiaVediAoXDYnjdk3h DVaQ== 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:dkim-signature; bh=Qj+DAxsSIX3ZqKCcNj9WFrsINQyctNKm0DapU8GePMg=; b=A3BFv9qA1wc7MNjbYskLOWOKosmlPSMik6X3Fz5KHPhN+rENvzAAEhqybtEgUif4YI 2DDdcIMN8QPtUZbF2WM3jozjWBGgV8ob2YBo22eUg+bfBCz2J0eN1ptfnCE9vKYzCZ7o 3KQQ5JnGzvu0i6tpEosdI6dYJsWBaK9O2ZVie+SK3GwTX8sy6NIM284hcwYmNM2MiP66 wMBguJKCBQwZsL+lGX8JGJe5/g81xg5hxUPjJKPh0S4dGjk7p46P5KMmShTWTQXFIK91 JYRS1gAL8qoiN+IeQItgcW3ZxpnHzNvEMJ0zRwsZ+TdkXUKgRAPPSDku/XIA8oPUqucM dDDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lCya9oPW; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12si16668883pgu.469.2019.09.04.00.44.07; Wed, 04 Sep 2019 00:44:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lCya9oPW; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728941AbfIDHnR (ORCPT + 99 others); Wed, 4 Sep 2019 03:43:17 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39829 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbfIDHnR (ORCPT ); Wed, 4 Sep 2019 03:43:17 -0400 Received: by mail-pl1-f193.google.com with SMTP id bd8so2868080plb.6; Wed, 04 Sep 2019 00:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Qj+DAxsSIX3ZqKCcNj9WFrsINQyctNKm0DapU8GePMg=; b=lCya9oPWLL6Z2sCvMqFx61guCAYb06hPqKEzeto7EkIbJJkzeWfSzu7uAmnoTtP8ml xwSSllg+7Cg/uFNKX3vW16GYIPDhCkAmstIR4IRc7GPm9D3jCJl1sgbuWkmzesSTQa1k VJyOgK5+Mv7W53iq0EhizOvaAZvrpzkaEotfxKWSziTRO3SQwvKiakik9sZQSga92v12 CF8lOSfMAKCJw8Qxi7kpK3/tCDkU3CULfpbAp+Lj3IGZp+WZtzlPfFHzYLA1zDI9nhXY hxsUV472mag4UDl6Vv5Go5942fXu/+UV8xMWd9JR43SMVyF30BYgkHYkcg/JrLxHLCR7 mUeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Qj+DAxsSIX3ZqKCcNj9WFrsINQyctNKm0DapU8GePMg=; b=fl5WoNzprwaFMwDohNLAX4kGjzktXPhNFP/9IYnyPT8xhBt7Pj4aYj5BVqoN0K/uHq JlMktfuZM0BUpWyVRMEG6/9BLbetsIG6PUYPBfOryhb9b8WEk8oZdwZTe9fvhCwsm33M P4vXYiC/Qf40xtpeueTkuWMIClO7Q2bcNJmJJRnAzS/s+3f71b5LHlm0qHY2moHdhb+9 AUNw/jEz0221gKVnDWYfDXYxPJOP3Z25s3jXbXlk4MMmblXAZtIGssxcGjHOjtS/Vnjv /8ce1QVridC85kmELe6aDNwK5oLmXqzawo+26JLuARVMOI6zI/EERH7ocyBHXJX/QSC3 LQGg== X-Gm-Message-State: APjAAAV+McYaoy/UQ4hRn2dkblOqi7wW4QlYFXqhhS/oA1pNEVFSqX1T pm0pybJpUQcnZUINYu5a9qc= X-Received: by 2002:a17:902:6b88:: with SMTP id p8mr38148119plk.95.1567582996648; Wed, 04 Sep 2019 00:43:16 -0700 (PDT) Received: from localhost ([175.223.23.37]) by smtp.gmail.com with ESMTPSA id c6sm14214884pgd.66.2019.09.04.00.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 00:43:15 -0700 (PDT) Date: Wed, 4 Sep 2019 16:43:12 +0900 From: Sergey Senozhatsky To: Michal Hocko Cc: Qian Cai , Eric Dumazet , davem@davemloft.net, netdev@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Petr Mladek , Sergey Senozhatsky , Steven Rostedt Subject: Re: [PATCH] net/skbuff: silence warnings under memory pressure Message-ID: <20190904074312.GA25744@jagdpanzerIV> References: <1567178728.5576.32.camel@lca.pw> <229ebc3b-1c7e-474f-36f9-0fa603b889fb@gmail.com> <20190903132231.GC18939@dhcp22.suse.cz> <1567525342.5576.60.camel@lca.pw> <20190903185305.GA14028@dhcp22.suse.cz> <1567546948.5576.68.camel@lca.pw> <20190904061501.GB3838@dhcp22.suse.cz> <20190904064144.GA5487@jagdpanzerIV> <20190904065455.GE3838@dhcp22.suse.cz> <20190904071911.GB11968@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904071911.GB11968@jagdpanzerIV> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (09/04/19 16:19), Sergey Senozhatsky wrote: > Hmm. I need to look at this more... wake_up_klogd() queues work only once > on particular CPU: irq_work_queue(this_cpu_ptr(&wake_up_klogd_work)); > > bool irq_work_queue() > { > /* Only queue if not already pending */ > if (!irq_work_claim(work)) > return false; > > __irq_work_queue_local(work); > } Plus one more check - waitqueue_active(&log_wait). printk() adds pending irq_work only if there is a user-space process sleeping on log_wait and irq_work is not already scheduled. If the syslog is active or there is noone to wakeup then we don't queue irq_work. -ss