Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp246581imu; Thu, 8 Nov 2018 00:57:24 -0800 (PST) X-Google-Smtp-Source: AJdET5f/A5ckonMKwqrmOPMuFAcLEDTxHQlRpY/EiyT4e3Ddjtq8yLRpYWbdgY42Ljqi8pZXZrFx X-Received: by 2002:a63:2849:: with SMTP id o70mr3038557pgo.155.1541667444006; Thu, 08 Nov 2018 00:57:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541667443; cv=none; d=google.com; s=arc-20160816; b=G9rMb1TuUU51n4U9dzwX+RmeaV8IE/aGD2XF7agMb1dBSUZQ8ROOJ5hMdGlf4R2tk4 CUYYV8IKys48yTfTMIPxAR0xlvCklm3kPLUUfEQPTdE+V1emjVI3IuZhVWKnAmuQ3eI+ GySynHUMRTgcvULiQagPv+9uoR5/UJQoCIy8POXh3i0lIfJQotxAjuTfeSiFOSq90Aj+ SOuuAfAbwZTNeLxp87D3MO4zfsm0KER21A2ZhRyfvxWCtTUrmEiiuPYVEtJisEpUWjnG 9TegM/OoVUBpA8hG9G5vEvEjNMFRwo71Kk/jOQro04KtRwvXQ68doLz76gu+LB9HcJ1u xn9A== 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; bh=FqkoC7iPFqbr9BEPmovFPbb9mdHAE3mBYUf7VCtZGrk=; b=LzOZRTjXJyUAw8w8q8u5jyqs0WhxlZoOzVKWxG5Dsc2aQK1Xcljj3dTSdgtV4T/XMu bQxodwjNfkxHO7GDnMp4KOMm5dRE5s+TxCW6en9rQGDtX/PZsmirt9NJ5m7EZBP58bpE 0l4fzwB+eDWX4ahl1NX1rYzgDJ7if7pOnPwvyq5pbddLrnRUIqRjvMwSFM0cky7XRrI6 +miN+/A1uRA7lVlUIm9CsQJbUN5RMrLVIRETPPd+G6jUmW/jXBTx+47atp0/7Jl7nGVB YvuSB52rkoTN0UZJurkrvGHGQKdGI5DhMMVgpsOi4epT/F+7WTLtEY43k3T0HCNGu4Nw CFbw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11-v6si3252811pgk.29.2018.11.08.00.57.08; Thu, 08 Nov 2018 00:57:23 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726846AbeKHSbP (ORCPT + 99 others); Thu, 8 Nov 2018 13:31:15 -0500 Received: from mga02.intel.com ([134.134.136.20]:60690 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbeKHSbP (ORCPT ); Thu, 8 Nov 2018 13:31:15 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 00:56:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="272358766" Received: from kohsamui.iil.intel.com (HELO [10.236.193.12]) ([10.236.193.12]) by orsmga005.jf.intel.com with ESMTP; 08 Nov 2018 00:56:44 -0800 Subject: Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk To: Andrew Morton Cc: sbates@raithlin.com, logang@deltatee.com, danielmentz@google.com, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, labbott@redhat.com References: <1541506853-10685-1-git-send-email-alexey.skidanov@intel.com> <20181106141131.76e94f6b1ff2859d96792aca@linux-foundation.org> <20181107141428.bd1f8b1a989449633394d8c1@linux-foundation.org> From: Alexey Skidanov Message-ID: <7c902049-4fc4-7c13-2ee3-c0a198767359@intel.com> Date: Thu, 8 Nov 2018 10:58:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181107141428.bd1f8b1a989449633394d8c1@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/8/18 00:14, Andrew Morton wrote: > On Wed, 7 Nov 2018 08:21:07 +0200 Alexey Skidanov wrote: > >>> Why does this need "fixing"? Are there current callers which can >>> misalign chunk_start_addr? Or is there a requirement that future >>> callers can misalign chunk_start_addr? >>> >> I work on adding aligned allocation support for ION heaps >> (https://www.spinics.net/lists/linux-driver-devel/msg118754.html). Two >> of these heaps use genpool internally. >> >> If you want to have an ability to allocate buffers aligned on different >> boundaries (for example, 4K, 1MB, ...), this fix actually removes the >> requirement for chunk_start_addr to be aligned on the max possible >> alignment. > > OK. This sort of information should be in the changelog, please. In > much detail. > Sure, I'll add this information and resend the patch. Thanks, Alexey