Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx12.netapp.com ([216.240.18.77]:32866 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968Ab3IEUCE (ORCPT ); Thu, 5 Sep 2013 16:02:04 -0400 From: "Myklebust, Trond" To: Quentin Barnes CC: "linux-nfs@vger.kernel.org" Subject: Re: nfs-backed mmap file results in 1000s of WRITEs per second Date: Thu, 5 Sep 2013 20:02:01 +0000 Message-ID: <1378411320.5450.27.camel@leira.trondhjem.org> References: <20130905162110.GA17920@gmail.com> <20130905170303.GB17330@us.ibm.com> <20130905191139.GA20830@gmail.com> In-Reply-To: <20130905191139.GA20830@gmail.com> Content-Type: multipart/mixed; boundary="_002_1378411320545027camelleiratrondhjemorg_" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: --_002_1378411320545027camelleiratrondhjemorg_ Content-Type: text/plain; charset="utf-8" Content-ID: <51CFE6B1A8CADF40A497B20F799E31F5@hq.netapp.com> Content-Transfer-Encoding: base64 T24gVGh1LCAyMDEzLTA5LTA1IGF0IDE0OjExIC0wNTAwLCBRdWVudGluIEJhcm5lcyB3cm90ZToN Cj4gT24gVGh1LCBTZXAgMDUsIDIwMTMgYXQgMTI6MDM6MDNQTSAtMDUwMCwgTWFsYWhhbCBOYWlu ZW5pIHdyb3RlOg0KPiA+IE5laWwgQnJvd24gcG9zdGVkIGEgcGF0Y2ggY291cGxlIGRheXMgYWdv IGZvciB0aGlzIQ0KPiA+IA0KPiA+IGh0dHA6Ly90aHJlYWQuZ21hbmUub3JnL2dtYW5lLmxpbnV4 Lm5mcy81ODQ3Mw0KPiANCj4gSSB0cmllZCBOZWlsJ3MgcGF0Y2ggb24gYSB2My4xMSBrZXJuZWwu ICBUaGUgcmVidWlsdCBrZXJuZWwgc3RpbGwNCj4gZXhoaWJpdGVkIHRoZSBzYW1lIDEwMDBzIG9m IFdSSVRFcy9zZWMgcHJvYmxlbS4NCj4gDQo+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Jkb21vLWluZm8uaHRtbA0KDQotLSANClRyb25kIE15a2xlYnVzdA0K TGludXggTkZTIGNsaWVudCBtYWludGFpbmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5l dGFwcC5jb20NCnd3dy5uZXRhcHAuY29tDQo= --_002_1378411320545027camelleiratrondhjemorg_ Content-Type: text/x-patch; name="0001-NFS-Don-t-check-lock-owner-compatibility-in-writes-u.patch" Content-Description: 0001-NFS-Don-t-check-lock-owner-compatibility-in-writes-u.patch Content-Disposition: attachment; filename="0001-NFS-Don-t-check-lock-owner-compatibility-in-writes-u.patch"; size=1257; creation-date="Thu, 05 Sep 2013 20:02:01 GMT"; modification-date="Thu, 05 Sep 2013 20:02:01 GMT" Content-ID: <91368020B98CA54CA732529781BED2A8@hq.netapp.com> Content-Transfer-Encoding: base64 RnJvbSA5MDNlYmFlZWZhZTc4ZTZlMDNmMzcxOWFhZmE4ZmQ1ZGQyMmQzMjg4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQ0KRnJvbTogVHJvbmQgTXlrbGVidXN0IDxUcm9uZC5NeWtsZWJ1c3RAbmV0 YXBwLmNvbT4NCkRhdGU6IFRodSwgNSBTZXAgMjAxMyAxNTo1Mjo1MSAtMDQwMA0KU3ViamVjdDog W1BBVENIXSBORlM6IERvbid0IGNoZWNrIGxvY2sgb3duZXIgY29tcGF0aWJpbGl0eSBpbiB3cml0 ZXMgdW5sZXNzDQogZmlsZSBpcyBsb2NrZWQNCg0KSWYgd2UncmUgZG9pbmcgYnVmZmVyZWQgd3Jp dGVzLCBhbmQgdGhlcmUgaXMgbm8gZmlsZSBsb2NraW5nIGludm9sdmVkLA0KdGhlbiB3ZSBkb24n dCBoYXZlIHRvIHdvcnJ5IGFib3V0IHdoZXRoZXIgb3Igbm90IHRoZSBsb2NrIG93bmVyIGluZm9y bWF0aW9uDQppcyBpZGVudGljYWwuDQpCeSByZWxheGluZyB0aGlzIGNoZWNrLCB3ZSBlbnN1cm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