Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp758921ybg; Tue, 28 Jul 2020 19:04:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye2WtdqJ9f3dLNhYs2RHN5OS2RdJ7NF27PStLXFPpHGtQO3dKMVZo4QJUKA2o2n6zIWqRU X-Received: by 2002:a17:906:8608:: with SMTP id o8mr27444443ejx.156.1595988283720; Tue, 28 Jul 2020 19:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595988283; cv=none; d=google.com; s=arc-20160816; b=h5iJyUlM3b/7A4HxmRvKxz0G/mvImlmmJuaxL3wcFzKZy0XZtpvN5zplkY9HS5soge IjIFgFaf+ZHXwnkrR5EztZZSyU4hbkho6vmvKXcMNw2brO9EPgRSfB3IhMGL2jb91iFn j27kNd2Nv/0GSyQNFBGHu04oZbychcGZgdXqqkEB4OKC4WoF+fG+mgOM7gR3TcJ+GrVC oFqQbJLIxieoHoqrxvKzHmN2aC6RK632R92xtYF3XE9Qo4kS6AtzTV1YWaCXtTeBSPIU 4WzpfIsC8KEzpH1C3ILRkHCfw/VcUtqU9GFqWS55EtpAk92szZxNfqZiKA0I2hotkKmr Pnmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=opm5/07OD3J2p/0n+7i7LzhKbmftCJUmIROWDMPvtU4=; b=II6v+YCPAO2fviuljhC21OFomPjEVcnpe7Fo75RF8WeFaijJDs3sOu9ZNujnHuvKAw Taf+4NwRia/Cl6Fyo75zxxc2H/+qHEw3jnhZJTXdd7nAsH+CXiFDrThqmDDmmCiqP+eB YIcLAdrhObxxk4BnBfM0K3T7HGNM7VST7IlpSGJ77FNQ2dx4y01gul7AvcvCMtKT7Uag neaZwsnV7cy9MMDFKAVs5WO888OBJpwVgHtGidIWW8UyH8oIL3NXm4VPGCBSgiirErOw iledOjsNHz/YAaU4ez+9p+rkMDCzLhJlB/MkTwhIpMHuXpSpiaCWgCZe0MgW7gPAuDxE j5wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KQ72dvnD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u5si365983edj.504.2020.07.28.19.04.19; Tue, 28 Jul 2020 19:04:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KQ72dvnD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730500AbgG2CEB (ORCPT + 99 others); Tue, 28 Jul 2020 22:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbgG2CEA (ORCPT ); Tue, 28 Jul 2020 22:04:00 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8F1C061794 for ; Tue, 28 Jul 2020 19:04:00 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id k4so11061306pld.12 for ; Tue, 28 Jul 2020 19:04:00 -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; bh=opm5/07OD3J2p/0n+7i7LzhKbmftCJUmIROWDMPvtU4=; b=KQ72dvnDALPU5r/omXmjdtZI2XRViO+8jLujYN8p1OScazfUGU7iVn84MKvhxWdR2X /QlikExYwVM9nSbPHOa6/fmtXlYXXOpn69tvZE/2cng2+Yto3ke8d/yfsmlL7ZJMi7TY S3x7Xrj99aYdBZDGwD+hFBmGGfPoYLaNvRQLaVejUc0K7v0okGraPCGZBvbVaV/revk1 wpCJWHjQHO2ad/cyQ8oUDVxr9x/C2PFNcf3fwuJm6pEnqaOETaa0P/zL+A09z6BdJFiG XS7Wl0XILYkRpZr2PkT10IPXVyjjGMN1CNKZ9Punu9fRxt5LKMbGRuM9hRBp2odHNHAG /NPQ== 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; bh=opm5/07OD3J2p/0n+7i7LzhKbmftCJUmIROWDMPvtU4=; b=L+eUkJmth5Ehg2XqmmJYT0HFS7UpDYeDr7ttDg0dAUnCFpAiYmeMs6DrwWSDY58Ks3 B4HAHtUu3dd4OaQiPiwaaJECW96JQxFNCfbDSJs7eliNBiGId5K9bt0u6o+OheU2g1MZ L4G6S+JhNPWVt4J43uDobY4kgatUMQ54mNWgJQfoid96f/UgBvMiY9sjMCoBj6P2/Gwh sEC/MBZxMv3NKwuICdbfHkeUxkwPRoYxPifhP+J20cvwqTQ0luYtJWjDCHm8qR1ikhEr h81qyINL5PwQT8a3kFHkOEGWYhf/B3dOVNrEZctffebP48AQoimK2cwpqBsZ3R2HsAck +qqw== X-Gm-Message-State: AOAM533h7NPO5PatWgRDUgHwVPDa/n97StDq/q0LouRQCV/2bbeCRlLp JVJjGzKxtDghK83MGwPTthM= X-Received: by 2002:a17:90a:9f4a:: with SMTP id q10mr7309395pjv.139.1595988239749; Tue, 28 Jul 2020 19:03:59 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id lt17sm401897pjb.6.2020.07.28.19.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 19:03:56 -0700 (PDT) Date: Wed, 29 Jul 2020 11:03:55 +0900 From: Sergey Senozhatsky To: John Ogness Cc: Sergey Senozhatsky , Linus Torvalds , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Peter Zijlstra , Thomas Gleixner , kexec@lists.infradead.org, Linux Kernel Mailing List Subject: Re: [PATCH 2/4] printk: store instead of processing cont parts Message-ID: <20200729020355.GA1534750@jagdpanzerIV.localdomain> References: <20200717234818.8622-1-john.ogness@linutronix.de> <20200717234818.8622-3-john.ogness@linutronix.de> <20200719143527.GA566@jagdpanzerIV.localdomain> <20200720015057.GA463@jagdpanzerIV.localdomain> <20200721144220.GE44523@jagdpanzerIV.localdomain> <87ft9kx6er.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ft9kx6er.fsf@jogness.linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/07/21 17:03), John Ogness wrote: > On 2020-07-21, Sergey Senozhatsky wrote: > >> That said, we have traditionally used not just "current process", but > >> also "last irq-level" as the context information, so I do think it > >> would be good to continue to do that. > > > > OK, so basically, extending printk_caller_id() so that for IRQ/NMI > > we will have more info than just "0x80000000 + raw_smp_processor_id()". > > If bit31 is set, the upper 8 bits could specify what the lower 24 bits > represent. That would give some freedom for the future. > > For example: > > 0x80 = cpu id (generic context) > 0x81 = interrupt number > 0x82 = cpu id (nmi context) Looks good to me. I'd probably add in_softirq state. So the contexts are: in_task, in_softirq, in_irq, in_nmi For the purpose of future extensions, I would probably consider u64 for callerid. So that we can store more "state bits" in the future, like disabled/enabled preemption; disabled/enabled local irqs; etc. -ss