Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2201140ybe; Sat, 7 Sep 2019 10:46:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwi5v5Oj0OftFjZpx9R1Olq0DeXjIfvAoFJBYvlzFtUWBiFN0tKpW3Td4j+GgUDHAJ+8a8/ X-Received: by 2002:a65:5144:: with SMTP id g4mr13629787pgq.202.1567878366553; Sat, 07 Sep 2019 10:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567878366; cv=none; d=google.com; s=arc-20160816; b=MK5mAx1E0Ct3LmF8xZXFhngde1EkLD7d0DtR5JtBLfjVmc8REZlt8xZQ3YRy5W2GXk LWijItB2CitLScopSXFqQQryHpGl3V8TbqbPN3WaQdk4axTqkZjph0IkCcRYu+VZJ+dU nm34kqdiEBToRiQ254Em3Y87vg74a0x75pkNFoDfAyX38TF3rD4lDlBJnnDyyU+JSWWi D3iUBBpdED9h6I2Jt28Gl+2X1RIAjyLxJvpHmDB/6Ub7xwk7f+vYm+IZIPfIzQ7ow2N5 Ih8BU1Wc48Gty9fU979aQKlKaiGVY9KGVni2YeYUj5HzQzfXHygomRYmSXT98o8vysNJ 7Heg== 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:date:from:dkim-signature; bh=eGYgkRZj0NcCUP7h3iCHHFaAC43wNkWYu1G5sWIpzZk=; b=H1bqtq4UoH7Z5vRVh8rqx0cl3n9MG57aOdM6QTQg3+vEh2FHfn83iMW9q7UjlNbW7J 45zWbDQINdkO3DXpKFDdDFwTPOa2yZbzBnEW0ZWukHoJKN7Ty5bsZeMIwlktW+y+DgrU uDKS8+qkIYFbQLxlXm8orDJJRuh0Mi63bpZrayF6LelLe8y95pNLdwXCvKBmKFcp3DHK ZHYogo6+03Ct5bSeeEWGao5kTvBJhrd5puGH2qPWD7ObF+uTkKU1j3yidw0t//VC0N2q RS82pRWqLtndN41lbViqwrPU2KMDxPmbz3+pmiSOc4TGiAHBehUQ5e++qCU0D2efap4O GJ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dPHHuipO; 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 g13si8241976plq.359.2019.09.07.10.45.50; Sat, 07 Sep 2019 10:46:06 -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=dPHHuipO; 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 S1732790AbfIFTvl (ORCPT + 99 others); Fri, 6 Sep 2019 15:51:41 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35866 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfIFTvk (ORCPT ); Fri, 6 Sep 2019 15:51:40 -0400 Received: by mail-pf1-f193.google.com with SMTP id y22so5237879pfr.3; Fri, 06 Sep 2019 12:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eGYgkRZj0NcCUP7h3iCHHFaAC43wNkWYu1G5sWIpzZk=; b=dPHHuipONUA43OXAQtslB0Nstvm9jMsRi2Xwq5hH50w+aW+QvRYutnw/fm+ZG7i0Uh DN6bxh04bPtnh8H+Jckkkjt4tqsrPRncv8LEM/2gGHj3+qgg1UfQcoX+NCedbCemX2hf 4pPzfsgB+v74/bibFiX73cVqf4tuH5FLNbguQx/Q9kKkjKrICJwZQoTaocu/szf93MIG 2lt4YqC8QUHBNGVldvYf3HiwJK+S5FJD4dDZozPpjAoh3EhBHkaSGy5yErN0Yiy3xoV4 fL9Lae/0xrXM1b2WJpTV85MiqBJnBZVNqs+EIjH4ORfj2WDZz5fD77nv4S9gbuWKmMtq 4tXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eGYgkRZj0NcCUP7h3iCHHFaAC43wNkWYu1G5sWIpzZk=; b=pM/zZqd4c2lZbg9IMX9O5ZAofFFJswtj55o2+i3KA8Uylyose98mURroklCX4Jb4// R1yIJmz3/ZsFWG6Fc/ecRH8yHN2za5o1tsRc39EYlHQbvvYbhIjzDtsAQ24r2vK8DoJY hE2aTboIp+9dnFl7jIOKgimQBUoU/qufkBBKBytBlMR+B1u5iM0wvJq1tB8DKjnGnvIt U5mpeQxCTe2Z/gNlN2mE3hpFZXxuAbUwx8n2RWZV52UMuHNpiz4mJM3CUM2nnpS0+vAC ScU1E/b5DJ/nZKRz6oh7dvH2E/DOGc0W9IvTeFOVTgoGBLwLM70U+PWYuTLoN04k+q2s 68Qw== X-Gm-Message-State: APjAAAXXjnDboY2pYWDUk+jGHTYdI/61JWUw3UgZ6cqJpj9cbKJWCKZw O/8MqurgPrCWNrxdHgKsTdg= X-Received: by 2002:a63:30c6:: with SMTP id w189mr9157795pgw.398.1567799499643; Fri, 06 Sep 2019 12:51:39 -0700 (PDT) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id q4sm7413899pfh.115.2019.09.06.12.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2019 12:51:38 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Sat, 7 Sep 2019 04:51:35 +0900 To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Qian Cai , davem@davemloft.net, Eric Dumazet , Sergey Senozhatsky , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] net/skbuff: silence warnings under memory pressure Message-ID: <20190906195135.GA69785@tigerII.localdomain> References: <20190904061501.GB3838@dhcp22.suse.cz> <20190904064144.GA5487@jagdpanzerIV> <20190904065455.GE3838@dhcp22.suse.cz> <20190904071911.GB11968@jagdpanzerIV> <20190904074312.GA25744@jagdpanzerIV> <1567599263.5576.72.camel@lca.pw> <20190904144850.GA8296@tigerII.localdomain> <1567629737.5576.87.camel@lca.pw> <20190905113208.GA521@jagdpanzerIV> <20190906145533.4uw43a5pvsawmdov@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190906145533.4uw43a5pvsawmdov@pathway.suse.cz> 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/06/19 16:55), Petr Mladek wrote: > > I think we can queue significantly much less irq_work-s from printk(). > > > > Petr, Steven, what do you think? > > > > Something like this. Call wake_up_interruptible(), switch to > > wake_up_klogd() only when called from sched code. > > Replacing irq_work_queue() with wake_up_interruptible() looks > dangerous to me. > > As a result, all "normal" printk() calls from the scheduler > code will deadlock. There is almost always a userspace > logger registered. I don't see why all printk()-s should deadlock. A "normal" printk() call will deadlock only when scheduler calls "normal" printk() under rq or pi locks. But this is illegal anyway, because console_sem up() calls wake_up_process() - the same function wake_up_interruptible() calls. IOW "normal" printk() calls from scheduler end up in scheduler, via console_sem->sched chain. We already execute wake_up_process()->try_to_wake_up() in printk(), even when a non-LOGLEVEL_SCHED printk() comes from scheduler. What am I missing something? -ss