Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2154200ybh; Fri, 13 Mar 2020 13:51:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsm3ilg8TeD2yIAb3PMJaGw513cdsMhhbEBtngQSUukHAqaOZJUuml83khjX1N0UQUkC179 X-Received: by 2002:a9d:1b7:: with SMTP id e52mr12136064ote.372.1584132704860; Fri, 13 Mar 2020 13:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584132704; cv=none; d=google.com; s=arc-20160816; b=hVHJm+mfOyxUEIDc28lQgZyI0RREgy/X1xsVZB5soadjXPibJpqqlTZ59xo9H2udpt iNo6A8lL+u5qPs4i3490vusRCAMtts9O+7F988j2XUh9vRevoXlXJyFQ7TgNYJHDU00f ZiOeVvnDScsRs5MvG8pymvWZeMuUV5gCAzgbIXERTVYF8RXBsRxKsHZklupZPB0btNJZ /XLJJ4/GjtbqdELMK44e65zaYZgCzlVNKTnDvkZVHj2ZxzCF63aJk23YJAZXcugoPTDS 6kO6L4ScPV3R6NUgSUgRKf+tWHCI7y1ts4rUvQFJEuZKGl4lfgziUvmBeVoEX8YJUm/3 QH9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZLkqiJ6k+u/kdHhnSAw6oeqKV753A2DLJwmyLzR9Ev8=; b=X+E4xwvPadsaEMSsK66KFJBIBSjh+shWmBvDRkoM0/Xvr/dtV3ZDJ15boH5/V6wj7z dvDs+Vvm28gff4VqaZOOQtrnOZPxYX3e8bLEzdYDDizakAjPxfTMT/WhwhFBexLlIU44 0iV9ub7SkR2Lt2XBNCQgYSfCCB8rFF0cAyBhg6iCptRtX2Tvr3QQJK5gqaDpAYSYEQSS of7OQEaMgl2tBRIg5nu4MZfkBCvnQniRB6XAg9WEsqA+XuRiQv+Y7EhZffiyocNGZWB5 fqLgsrDGGbVB5Iq4WF9hEGBK85gdm+fP5LioPH3q2tdz9XnoPkrhtONQhZiIRWO1x1rW kNBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="isEHg/DY"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si4835877oif.49.2020.03.13.13.51.32; Fri, 13 Mar 2020 13:51:44 -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=@google.com header.s=20161025 header.b="isEHg/DY"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727422AbgCMUu3 (ORCPT + 99 others); Fri, 13 Mar 2020 16:50:29 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40729 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbgCMUu3 (ORCPT ); Fri, 13 Mar 2020 16:50:29 -0400 Received: by mail-wr1-f66.google.com with SMTP id f3so6797328wrw.7 for ; Fri, 13 Mar 2020 13:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZLkqiJ6k+u/kdHhnSAw6oeqKV753A2DLJwmyLzR9Ev8=; b=isEHg/DYtMvvf9cJ6uBf/T6xaEz0sze5nU3jhjbEf7S/EPwBflp8U/kIkNMCY/qyz1 qMX9lQb5mtQ5Xf2ivw+Qmb7Tb30Dwg9G0RkLdszctk6Dpwy2wRzFjBXbifvmq/T1SmNv qo01RSPIiZY5eZuzHEFsOrU5dySp5/mq6mOTERonUBh2VVLl71jog/KgErvfHb2HU2SH 9LCVUJZBdjQUz41raD0X6fQfSdEcUhZjb8p1rtNnzNg+t9kMTF5HfHs0HjqlNIHq7DPh O8rpMkjPl6BfyzY0cbPUGUdBPtW6m10Adr9A00HBFQB3rea7oC8g8LSq6q8I5peYlpCp 0/eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZLkqiJ6k+u/kdHhnSAw6oeqKV753A2DLJwmyLzR9Ev8=; b=XQeNs5BMGo8YE3eYkB74ko7/2+Ceue0yjqVuTb/6LvVBm5pttIhhceGYZ8mTN4AsR1 BCj1uPJXH0jMu14iz9NWsTAI95dtnu66RtQC0AquCGACNYiu1IXU7nVRk4U0Lv3f96o/ pb5XLqndAYDw1PoWiaXU8sQNF9UzapSNbU4kux8rVPT9yaIp/golA9COWIXNsnWlJ3AZ 1/rw8H8GpmkLsPy+Pok21U0Iv/hwkO977+bee4TP3e89ptX5s2PB9c+rK1LDTwuV3vOn kjOfV6X2LSWaHI0/Smefr0cnVrIuK6lAb3pC0ClXlg5TxtKbjD3mF+2inKcFfxbav13o AVWg== X-Gm-Message-State: ANhLgQ0bTZYZAnxmdHfKe4WTCeULgs2d31RbeUc7UxEGgRCHBz4hmT4u NfSVH3HUkn+bWmGNB1rz1UHYncqukp1liVqR6FMriw== X-Received: by 2002:adf:afdb:: with SMTP id y27mr19990685wrd.208.1584132627671; Fri, 13 Mar 2020 13:50:27 -0700 (PDT) MIME-Version: 1.0 References: <20200311235653.141701-1-rammuthiah@google.com> <20200312082427.GA32229@infradead.org> In-Reply-To: <20200312082427.GA32229@infradead.org> From: Ram Muthiah Date: Fri, 13 Mar 2020 13:50:01 -0700 Message-ID: Subject: Re: [PATCH] Inline contents of BLK_MQ_VIRTIO config To: Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 1:24 AM Christoph Hellwig wrote: > > On Wed, Mar 11, 2020 at 04:56:53PM -0700, Ram Muthiah wrote: > > The config contains one symbol and is a dep of only two configs. > > Inlined this symbol so that it's built in by the two configs > > which need it and deleted the config. > > So now we build the code twice instead of once. Nevermind that you > have dropped the copyright noticed. What is the point? > The android kernel team is working towards generating a generic kernel that can be used across many devices. One of the devices in question is cuttlefish, a android virtual device that relies on virtio blk. The config here, blk_mq_virtio, is needed for virtio-blk but it is binary. blk-mq-virtio cannot be built into this generic kernel in the interest of keeping all virtio related configs as modules. (This compromise is needed to enable all physical devices to run this generic kernel.) To fix this problem, there are two paths forward that I see. The patch proposed fixes the problem by inling the one symbol blk_mq_virtio has since this symbol is used in just two tristate virtio configs. Additionally, the symbol is fairly small so this doesn't seem like a bad solution. Alternatively, I could modularize blk-mq-virtio. It does look like this config was meant to be tristate based on the include of the module header and the export of blk_mq_virtio_map_queues. If the latter approach is preferred, I'd be happy to resubmit the patch.