Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3324152imm; Mon, 4 Jun 2018 01:22:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJQlEltua5edtrDmzXVDCB4VON51DvZRAYcbytaCfrExD4TZVun6TzwttEf+zycOQcXqtAf X-Received: by 2002:a17:902:8348:: with SMTP id z8-v6mr4485878pln.239.1528100527856; Mon, 04 Jun 2018 01:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528100527; cv=none; d=google.com; s=arc-20160816; b=C6GlneBmoVS6sj5rU8yJllvxlB2vCAN64R2PF9TO3prAfvTNJMKgwD1pv8WF9dTbjD L2KsQ0vDiGk48JVJB7QFthm7ewdly8agdUfIjvwiSdon2SRiDKW2mOUbjWY+jsIsZBoZ bK9rF9GIIgE3n5MFchPeEW40lCEOVpEeAuHkf+0Js26bHnqaZx+PJU93VxFvcO9K4+Xc r5HvLVd7H0V7ZSmP2Pl9XhBF4cyiL0l88GnrfSMOmsSRQAX9BdP+WbEvoM+CdfCVNuwk EzIqr/V7dDpaWltJyLsJopjBsCXpfhBD2yP2zrQGdZ1tVTILhvHV5R72i1GHw8ZSkDiB sefA== 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:message-id :mime-version:references:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=+pYYSToWwh9GiKuSiEzz4vaPYd1oReHqsdL1sBh/STg=; b=CmXavMhBB+jtkBe+h/8YqIxSfUKwtyzlaIZMimnP6Yi33DyvMgmdFd+Zp9D6ojE0jG MwHniU05NxNFqjp41LRg7vlfpG/4Z+cHqjwkPXIGp7MG4egMDYvIYmlwd+bPDgsITBZb OjAndmdbc9GxISFgQXmrJcholdAgkcGy+qZ9KdxMYbuWfBYl006zDsBlfDuYl2sZleQ+ x8Qt9HPjs2MuRAY0LLJUkvFGy/KHGs9omhSf+SDdjKVw7YvSxdxAU5e61ajVy4ctfR0b Mjj5AZhEYWVplTqjHK4L+OXYFVZLJslSPQI9duY/O9vgaFQT7w5e5IPep6lU6xeMussm aHlA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 43-v6si47770463pla.509.2018.06.04.01.21.53; Mon, 04 Jun 2018 01:22:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752003AbeFDIUb (ORCPT + 99 others); Mon, 4 Jun 2018 04:20:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33918 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbeFDIUa (ORCPT ); Mon, 4 Jun 2018 04:20:30 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w548JitU106654 for ; Mon, 4 Jun 2018 04:20:30 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jd1kvgk53-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 04 Jun 2018 04:20:29 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Jun 2018 09:20:26 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 4 Jun 2018 09:20:24 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w548KNbA14811204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jun 2018 08:20:23 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 40F8E42042; Mon, 4 Jun 2018 09:10:48 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0760C42041; Mon, 4 Jun 2018 09:10:48 +0100 (BST) Received: from mschwideX1 (unknown [9.152.97.207]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 4 Jun 2018 09:10:47 +0100 (BST) Date: Mon, 4 Jun 2018 10:20:22 +0200 From: Martin Schwidefsky To: Christoph Hellwig Cc: Linus Torvalds , linux-kernel , linux-s390 , Heiko Carstens Subject: Re: [GIT PULL] two more s390 bug fixes for 4.17 In-Reply-To: <20180531161400.GB10203@infradead.org> References: <20180530075920.1f73275a@mschwideX1> <20180530074130.GA6927@infradead.org> <20180530111140.40c791bd@mschwideX1> <20180531161400.GB10203@infradead.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18060408-0012-0000-0000-0000027A6870 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060408-0013-0000-0000-000020AB275C Message-Id: <20180604102022.3bc03229@mschwideX1> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-04_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=924 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806040104 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 May 2018 09:14:00 -0700 Christoph Hellwig wrote: > On Wed, May 30, 2018 at 11:11:40AM +0200, Martin Schwidefsky wrote: > > On Wed, 30 May 2018 00:41:30 -0700 > > Christoph Hellwig wrote: > > > > > > - req->completion_data = cqr; > > > > + *((struct dasd_ccw_req **) blk_mq_rq_to_pdu(req)) = cqr; > > > > + > > > > > > Please don't play such tricks. In general your driver structure > > > should have struct request embedded. If for some reason > > > struct dasd_ccw_req has a different life time please create a new > > > structure instead of these hacks. > > > > Why do you consider this to be a 'trick'? The blk_mq_rq_to_pdu is > > meant to be used to access a block of data that is is associated > > with a request, no? With the change we store a single value, the > > pointer to a struct dasd_ccw_req. The struct request comes first, > > later do_dasd_request creates the struct dasd_ccw_req with the > > CCW chain for the request. And for the blk timeout handler we need > > a way to find the dasd_ccw_req again. > > We'll we try really hard to have a structure that we can use > container_of on. At least a minimal container with just the pointer > for a quick fix, but in general it seems like you should be able > to allocate the whole dasd_ccw_req with the request and just initialize > it later. A minimal container with a pointer is easy enough to do. To replace our allocation scheme for the CCW chains will be hard. For one there are internal I/Os that do not have an associated 'struct request'. For those we need to allocate the memory on our own anyway. Then the size of the memory block you need for the CCW varies wildly and can be quite large. The tag cmd_size is fixed at the time blk_mq_alloc_tag_set is called. If we replace out allocation scheme this would force us to use the maximum size CCW chain for the tag size, no? -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.