Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp285985imm; Tue, 22 May 2018 18:59:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpRLPMA+IcfaLUzVOVpw4h9eegUH/cIW/8+8ba7T4AAFzN0YpkdEjZBwywgoKSvlJam5TLi X-Received: by 2002:a63:6b43:: with SMTP id g64-v6mr696649pgc.337.1527040797332; Tue, 22 May 2018 18:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527040797; cv=none; d=google.com; s=arc-20160816; b=bx5uwcaBX6Ygf67u+/5iu7chGTcdyhWoZcsN/rBGzinCTFb/4/uVhtftyAqRdFnDnz 0nO+tGrKPqehNeKrJTJxKvq9EBp5dFa66+Kv0hqdjtFP0+8tSZpItzAZBshojKL5ODax sq62Py+Dvp9TIZbNin+EtvBNXQ7KQaKkXLvnc9ysZZj46cNgYqkDAo3GQr2Xa0aZBPiy T7fe4v+fyiYYJqtTTy7/c0BCZCeipCBnCjCF66Sq8iATMlkDzPt5ZcuU/XkoEFPOMKPd jk5kkcr8QjaUGXk/mWQ8YZvbtemnd11EwVpCxKFtpByagLT/LFAH97xOJ7o8+07C7D71 t1og== 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 :arc-authentication-results; bh=u+EKF3C+zFGW/db1vHBTm6LkwehXf03ynEmUl3173pM=; b=Sfx4usY3TCQ8yJAWxWynICPzmphvOTp+qcVxBKB1Lyshq/parAfeY+eJx8jr4SO2bq qMl1RquMS5t4v5ykIlpvo/pjm50cC4uwxxRDnG7XIchlSKBih2hj5rN4keb7dvn2KeG/ cDNaasLfiaDOBCRSo15zUzMf5XyKRJusjnocRfOtOZo+H7NRsHwpcrDB0K2FpSKmCOIM p1vTRERpwphUkDpfqbLPt7VJyjceEoCSFtxU6UqKTTmwVIjozu6BF7NiHeO/z9DnQ2+O gCU4Ej6zXOv6bLCPKk0TVRljzMPz1QXA7NmNZKiOQ+0NnLngNIHdTpDdnqqLZL7NkDvO uUJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=XeMzi/EK; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si17478308pfl.309.2018.05.22.18.59.28; Tue, 22 May 2018 18:59:57 -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=@oracle.com header.s=corp-2017-10-26 header.b=XeMzi/EK; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753734AbeEWB7S (ORCPT + 99 others); Tue, 22 May 2018 21:59:18 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:55434 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753672AbeEWB7Q (ORCPT ); Tue, 22 May 2018 21:59:16 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4N1vG6A134533; Wed, 23 May 2018 01:59:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=u+EKF3C+zFGW/db1vHBTm6LkwehXf03ynEmUl3173pM=; b=XeMzi/EKw1Xsff9OHdnfVvg4+bjfdRxusnQrqENAw9lJ7hrL+BHwQcomNKFnWUefSYH/ aSF9ciw/cux7pNfNOz41NWMBUr6gn28pJ+x1dDv2fqUYovf7xCLE1hapgNmdT3TyejRk xqKpef0bUgX9Pdff92vTjYnjOC1vMYCRA7VN6pz5RnnLlnOONPfhewiQwCBmud0cyuPr yj97KA4PHBEyguuhJZssx43sV382bboAmi6YW/OFqPdxQS1enE5ov5yfoZbNiG9SKpqp szThitltzv1oHzuhFuoTTUV3cPtkMz91XfieW7QxIY5XknyyJkEf/BA62dT1/467nc6S mA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2j4nh7j0cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 May 2018 01:59:12 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4N1xAG5012464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 May 2018 01:59:10 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4N1x9j9031603; Wed, 23 May 2018 01:59:09 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 22 May 2018 18:59:09 -0700 Subject: Re: [PATCH] block: kyber: make kyber more friendly with merging To: =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1527000509-2619-1-git-send-email-jianchao.w.wang@oracle.com> <163c5760-cf0e-faea-ee4e-ac5d688310fe@applied-asynchrony.com> <00e5dfd4-d3a2-b008-3d8b-390a788f61c9@kernel.dk> <7c93b85f-6a02-bdcf-5e92-a9533500df20@kernel.dk> From: "jianchao.wang" Message-ID: Date: Wed, 23 May 2018 09:59:15 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8901 signatures=668700 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805230015 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens and Holger Thank for your kindly response. That's really appreciated. I will post next version based on Jens' patch. Thanks Jianchao On 05/23/2018 02:32 AM, Holger Hoffstätte wrote: >>>> This looks great but prevents kyber from being built as module, >>>> which is AFAIK supposed to work (and works now): >>>> >>>> .. >>>> CC [M] block/kyber-iosched.o >>>> Building modules, stage 2. >>>> MODPOST 313 modules >>>> ERROR: "bio_attempt_back_merge" [block/kyber-iosched.ko] undefined! >>>> ERROR: "bio_attempt_front_merge" [block/kyber-iosched.ko] undefined! >>>> ERROR: "bio_attempt_discard_merge" [block/kyber-iosched.ko] undefined! >>>> ERROR: "blk_try_merge" [block/kyber-iosched.ko] undefined! >>>> ERROR: "blk_rq_merge_ok" [block/kyber-iosched.ko] undefined! >>>> .. >>>> >>>> It does build fine when compiled in, obviously. :) >>> It's basically duplicating the contents of blk_attempt_plug_merge(). >>> I would suggest abstracting out the list loop and merge check >>> into a helper, that could then both be called from kyber and the >>> plug merge function. >> See attached, prep patch and yours rebased on top of it. > That was quick. :) > > Applies smoothly on top of my 4.16++ tree, now builds correctly as > module and is reproducibly (slightly) faster even on my pedestrian > SATA SSDs, now on par or occasionally even faster than mq-deadline. > What's not to like? So: > > Tested-by: Holger Hoffstätte