From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFB3FC169C4 for ; Fri, 8 Feb 2019 07:30:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B00D521919 for ; Fri, 8 Feb 2019 07:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549611006; bh=9HAvuBYkvA8l+AcQiwixcWqaAo16OfGsqho95PdFtgw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=KcpJlkqW4atnPt9LlNpGBskdVE5uVRiutow5t2Y+QOnyLdFYzLnHJt5OWcEv4AwEl /1YUkiqiaCZD6ihToEc5zZiP2zalusVzT8VsJD0ced+REEnwB4oo4CFFybbLaP6cwt uh5nMmugrEhHHy0Q2lE0PxsAAnAoPDKJ7trPH8wk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726115AbfBHHaG (ORCPT ); Fri, 8 Feb 2019 02:30:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:36874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfBHHaF (ORCPT ); Fri, 8 Feb 2019 02:30:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2708521916; Fri, 8 Feb 2019 07:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549611004; bh=9HAvuBYkvA8l+AcQiwixcWqaAo16OfGsqho95PdFtgw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aP2sft00xNUTGip7Nzg+/7sEcMmzPbdrWCkHvz5s0YKzw0rWuobKoz5uAXVdIUT+0 avoXDeVlnd1O6GEh/kKd6Sc+DOV3XYLUUqab1/Ye+5jMXM5vfzR9TwUP4wKu8v9hLz lX8vpxlicSp9/gMysKA1VqZY72hmluP0FchREMEY= Date: Fri, 8 Feb 2019 08:30:02 +0100 From: "gregkh@linuxfoundation.org" To: Alexey Brodkin Cc: "David.Laight@ACULAB.COM" , "geert@linux-m68k.org" , "peterz@infradead.org" , "stable@vger.kernel.org" , "tglx@linutronix.de" , "will.deacon@arm.com" , "linux-snps-arc@lists.infradead.org" , Vineet Gupta Subject: Re: patch "devres: Align data[] to ARCH_KMALLOC_MINALIGN" added to driver-core-linus Message-ID: <20190208073002.GA2869@kroah.com> References: <1541965277161164@kroah.com> <4881796E12491D4BB15146FE0209CE64681D5C43@DE02WEMBXB.internal.synopsys.com> <20190207155213.GC7164@kroah.com> <4881796E12491D4BB15146FE0209CE64681D64C3@DE02WEMBXB.internal.synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4881796E12491D4BB15146FE0209CE64681D64C3@DE02WEMBXB.internal.synopsys.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Feb 08, 2019 at 07:13:39AM +0000, Alexey Brodkin wrote: > Hi Greg, > > > -----Original Message----- > > From: gregkh@linuxfoundation.org > > Sent: Thursday, February 7, 2019 6:52 PM > > To: Alexey Brodkin > > Cc: David.Laight@ACULAB.COM; geert@linux-m68k.org; peterz@infradead.org; stable@vger.kernel.org; > > tglx@linutronix.de; will.deacon@arm.com; Vineet Gupta ; linux-snps- > > arc@lists.infradead.org > > Subject: Re: patch "devres: Align data[] to ARCH_KMALLOC_MINALIGN" added to driver-core-linus > > [snip] > > > Ah, I was waiting to see if you would notice :) > > Well I was just patiently waiting as I guess there's a long queue > of patches to deal with in your inbox :) > > > See this question from Linus about this patch: > > https://lore.kernel.org/lkml/CAHk-=wj3Q7CkMQYwfZSsqUTqkEhNwVGrRbCwe7AVJ70S8i5sWw@mail.gmail.com/ > > I didn't see that. Though I intentionally sent my patch to most if not all > arch maintainers so they might share their concerns... but IIRC nobody ever > replied with either concerns or acks. > > Also I do agree that it's a trade-off between: > 1. Predictability > I was completely sure devm-allocated buffer is the same as anything kmalloced > except some meta-data stored _separately_ and so supposed alignment > should match as well... but how wrong that feeling was. > > 2. Optimization > Indeed it's so sweet when both devm "meta-data" and real small buffer fit > into 1 cache line. > > > I figured that you all did this for a good reason, and wasting that much > > space was going to be ok. But, I wanted to be sure, so if you never > > noticed it, I figured it was not that pressing of an issue. > > It's not super pressing because: > 1. Fortunately [or unfortunately] this problem happens only in pretty rare cases > like that Etnaviv driver where I first caught it. > > 2. There's a solution and affected parties may apply known patch locally. > > > Anyway, is this really needed to be backported? > > For us poor ARC developers and users it's really needed as our tools ABI > sets 32-bit alignment for 64-bit types. See that's the same optimization - > why wasting precious bytes on useless holes - let's pack data tighter :) > > So having that fix at least in the most recent LTS (i.e. 4.19) would be really good. > As for older kernels I think for now we may not touch them as indeed change is > quite intrusive. Ok, that sounds reasonable. I'll go add the patch there and see if the ARM64 people even notice :) thanks, greg k-h