Received: by 10.223.176.5 with SMTP id f5csp764473wra; Wed, 7 Feb 2018 07:11:44 -0800 (PST) X-Google-Smtp-Source: AH8x226LCdygCuDYv5ypxcEsr5d9susuv/zBH2qAASmwESV8nBDeXMDyuEyOV13P0mzvzW0fJoKk X-Received: by 2002:a17:902:8c89:: with SMTP id t9-v6mr6165101plo.2.1518016304256; Wed, 07 Feb 2018 07:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518016304; cv=none; d=google.com; s=arc-20160816; b=Zjm3QRzwP39ceae3AXiQJPdWTga65CNSj+BlYFVn4YoHOJyIYWgX/jB1427IlkFI2s kDBPiDSjbDGJpgALPcchSAO6o2srAVH6/8Dh5DfT2lS2WbTU15yjcpnzO5q0v+cya8WC MRPlXaNmHlZcs0yCbU9ANrRoH3asu18bgsQmAYU/SYEYyeFRYiASdYq2u2GcTR5lmBkc sqdKPbNSfbkO4ZCBmVKQQcuk4502sLHQGXDsJgjRyPRziUhVih9c0lDBm1Ph9auI4QkJ KwAG69mRszDjWxqnTzQ0+tmsD+J4XUgAUhYyIBGKLwy+ghE9K9k/vFiCRIKAWOxDipPb QM8A== 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:arc-authentication-results; bh=8e00FelvuuzHRdK9+lT6YtpQEdBlD4814n8uZ7BeH1M=; b=btX50RdQ20kbWc3Cjbf4c18W9VRQ6GHCOdroR92gE8PSml8j+TJAGYwL/GJvNxOvJT ZqaHL8dgasKyATAa5MZg7ROu5SKcPMDC+cLZv72lVyyKIuYpGEj/Kx/ixLpVTA1Fb5e+ Fv4woO7kil3sM4L73RwiyPF3Bo/TLX5G3FDPl9jPs5jW6bZoQFfKNybizx4SFQVFKabW zXJsglPYqXvF/QxFjqpR5OgPNH32LuUEpiiD4+F0ghoySJQ4zQiHSnwNs1Rvf/iJlto/ GCcL9PMR2NhGOMr+Nq9AO2eZG/6uzcuBkGSHGOfyBgpygPZzO4H417exmlnBJ9zcwF1g qCZA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u64si1235158pfk.340.2018.02.07.07.11.30; Wed, 07 Feb 2018 07:11:44 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754546AbeBGPKS (ORCPT + 99 others); Wed, 7 Feb 2018 10:10:18 -0500 Received: from mga18.intel.com ([134.134.136.126]:21459 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbeBGPKR (ORCPT ); Wed, 7 Feb 2018 10:10:17 -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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2018 07:10:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,473,1511856000"; d="scan'208";a="199401662" Received: from alexey-system-product-name.iil.intel.com (HELO [10.236.193.131]) ([10.236.193.131]) by orsmga005.jf.intel.com with ESMTP; 07 Feb 2018 07:10:09 -0800 Subject: Re: staging: ion: ION allocation fall back order depends on heap linkage order To: Laura Abbott , devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org References: <58951af2-a84e-7d7c-e956-ece3190aa8c2@redhat.com> <0217ee91-25fa-f563-81bd-ba4ad4dc9377@intel.com> From: Alexey Skidanov Message-ID: <3f77b591-6248-da0a-e20d-88ca26a60a95@intel.com> Date: Wed, 7 Feb 2018 17:10:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: 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 02/07/2018 04:58 PM, Laura Abbott wrote: > On 02/06/2018 11:05 PM, Alexey Skidanov wrote: >> >> >>> Yup, you've hit upon a key problem. Having fallbacks be stable >>> was always a problem and the recommendation these days is to >>> not rely on them. You can specify a heap at a time and fallback >>> manually if you want that behavior. >>> >>> If you have a proposal to make fallbacks work reliably without >>> overly complicating the ABI I'm happy to review it. >>> >>> Thanks, >>> Laura >>> >> I think it's possible to "automate" the "manual fallback" behavior. But >> the real issues is using heap id to specify the particular heap object. >> >> Current API (allocation IOCTL) requires to specify the particular heap >> object by using heap id. From the other hand, the user space doesn't >> control the heaps creation order and heap id assignment. So it may be >> tricky, especially when more than one object of the same heap type is >> created automatically. >> >> Thanks, >> Alexey >> >> > > The query ioctl is designed to get the heap ID information without > needing to rely on the linking order or anything else defined in > the kernel. > > Thanks, > Laura That is true. But if we have 2 *automatically created* heaps of the same type, how userspace can distinguish between them? Thanks, Alexey