Received: by 10.213.65.68 with SMTP id h4csp1013137imn; Tue, 20 Mar 2018 23:44:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELsyb7KPQnNVXy2FaZysg9CuFkqSmteDX8akNipU1kAD7K0uYzvX26tcPEUPoTl2eXaPk8oG X-Received: by 2002:a17:902:7b85:: with SMTP id w5-v6mr19642245pll.131.1521614699418; Tue, 20 Mar 2018 23:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521614699; cv=none; d=google.com; s=arc-20160816; b=w14bn4QplxsQHN9zPvjWfsym24zVj42LHv5jx+P5ZNOTDys05XhiVH3OnDJeQ8EZsS WOflZNrHEhaKsD7TzQQOe0NvZwdFyeoIJmOlzocEbPQfqESwYQWspMo0lkAb9m95I3qh OE0EvSjs4nu6W0FC28QcSNvOO9tJiA+y/ThtsyF1OjnUbERHBhZ5bOA9GHw17L39rG+v Xc8DZB1oufpY2qEqQWXzXx/93rkdFE203L+zPdjFDERLzwTMjclJQ7RyW5pd9EnvJF55 +Vfkjvm9qn3hU+lcK7AxKJwFEmZVkdC3FEO5xpTvAz8fYFYLLk8Sx7wpxooap7QAdyV/ rDjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=K9c6EE/KYvHGHhD968rMJ2pzez9B0otX+FoMNuBxd1E=; b=GCIRcCOz9xxHFvOPiaQKh/QkiMirK2oCRehBPiCoszqHMTL4wgJTz6uLCyvTLIZMXg hJZi5ysliNqBJTTNktMY/gf/pEMAkFwadE4+Oc8oNH40i3Z1mXac20pfiBnoM1BjpHKl KvFeMD0ogBgACHeSrIK9QeRZIJXi4LmFb09ND52thBbO2hEG9bYPTUo/cnVBAGdNO3me 2oOsLP4EaYY/X9rsnUHv0R+Vz4vmBxwi3m3H1/KkwMH92DlDwEfvG58awfem8pkn39/E U4JCwasGlOYKmoMwicopQVf2hph4CQyx9dJXMc34vQVExWzb27fkLymkZLwKIGe4koFu C0Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TxqPLExu; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si2351579pgn.340.2018.03.20.23.44.13; Tue, 20 Mar 2018 23:44:59 -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=@gmail.com header.s=20161025 header.b=TxqPLExu; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbeCUGlf (ORCPT + 99 others); Wed, 21 Mar 2018 02:41:35 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:40048 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbeCUGle (ORCPT ); Wed, 21 Mar 2018 02:41:34 -0400 Received: by mail-pf0-f196.google.com with SMTP id x1so1645518pfh.7; Tue, 20 Mar 2018 23:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K9c6EE/KYvHGHhD968rMJ2pzez9B0otX+FoMNuBxd1E=; b=TxqPLExuaTZ41hPdSFFFSijKmBK4S6S4uFyN0GC9qTgNNWDOrX+EnF65OCFVsh6BNs Pv4ZctkOiAXImo2Ag6+SvXgrPCpGwhQgdY6MX6cP6gxmngqLY8MoOx3U1UB+vUVCGe5o RED+hnI0RspzEREFErBqmQdT96a6LqZU2cgvEzkioSCLNAT1UNI2dtBMadhxsjA6cxRZ ekzpZmOrlzAQyRH2ZNo/4Hq+MP24CEolpEaXg1jM2XgFaURwA1uEiTYR0yyR5vxb+LSv jp5q/Cl5j/DdlKGCznJVY5elnVLHgC2/epvV9r1+16wSfeIeRh5yyYHoZIR7wp4hlINa oNvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K9c6EE/KYvHGHhD968rMJ2pzez9B0otX+FoMNuBxd1E=; b=SlUGBXXYprEy3q+8sAtRXh5oEe9yotkIP8ZyDzFIvvm8qGHu+K+PZiI8QAsLEpypwp 3uHzNyVyD0/K9pdBB37FSpArCRnerrTmJSjH/FDdROO8+RpmirDavnTYRN9ACicA/D2C eDbBGAu7bXZ7auFdrYVdJyC7dnIJVQvfFM1pf0NgXd7sWzZBI/4E6nqMv7C5ENO+JB+X gxj2bR4DOO08mbigJV3gma6l67oO9lNQ+AK1Kl0yIoGGraUqXQx/pkB6GCYpRRaK9ACH eoRkCF6rVSNzxDBP1iHGJ7qkNKUamb//ubgzmlB+adawl7NvJ9pUETYyNBlNx9QA9/9n RvTg== X-Gm-Message-State: AElRT7FGdVIEVuJWatQt/DshEmozSOaQ3gXFCz54wXPymaVb7Y8XPKvm cnaHKRp8lvwvU2+1EtJePFQ= X-Received: by 10.99.55.1 with SMTP id e1mr9757606pga.237.1521614493603; Tue, 20 Mar 2018 23:41:33 -0700 (PDT) Received: from localhost ([175.223.27.28]) by smtp.gmail.com with ESMTPSA id 68sm5801452pgi.14.2018.03.20.23.41.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 23:41:32 -0700 (PDT) Date: Wed, 21 Mar 2018 15:41:28 +0900 From: Sergey Senozhatsky To: Maninder Singh Cc: herbert@gondor.apana.org.au, davem@davemloft.net, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, akpm@linux-foundation.org, colin.king@canonical.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, pankaj.m@samsung.com, a.sahrawat@samsung.com, v.narang@samsung.com Subject: Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length. Message-ID: <20180321064128.GA468@jagdpanzerIV> References: <1521607242-3968-1-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521607242-3968-1-git-send-email-maninder1.s@samsung.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/21/18 10:10), Maninder Singh wrote: > (Added cover letter to avoid much text in patch description) > > LZ4 specification defines 2 byte offset length for 64 KB data. > But in case of ZRAM we compress data per page and in most of > architecture PAGE_SIZE is 4KB. So we can decide offset length based > on actual offset value. For this we can reserve 1 bit to decide offset > length (1 byte or 2 byte). 2 byte required only if ofsset is greater than 127, > else 1 byte is enough. So what happens if I compress the data on a system with no dyn offset and then send it over the network to a machine which has dyn offset? Or, say, I have a USB stick with a compression enabled FS, store files on a dyn offset enabled PC and then mount that USB stick on a machine with no dyn offset support. And vice versa. -ss