From patchwork Mon Jul 29 21:31:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 18651 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DC9CE248D1 for ; Mon, 29 Jul 2013 21:31:40 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r13sf3596862yen.11 for ; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=QewtY2z7lOB3lIEzlFWUZE22khvUZzGoPaS9MYGrsVs=; b=KmY/f5QndGkp5V0aFxWnTerIoKM50qJwDvbUIiGpTptLa/8//lQtTg8CVUGnOLIhQX gCxV+u2KdMwq8vYMkIARnpH2OrTVuv/GJMHb16JXG8dq71jSfLttoEOGHf+nvXcnBmcA 75J4XLcsI169e4UT6BRzp0Pj7nyXMrO9hQpI1/Cnj8zG9/rNf1dZKzCvrtu1Qsd4kv2T 4VHfFiVnwJvtNBPkbelmRsQRKS8vMFJkKieRufuvu0ZbzXt/OTdwQkVw1L/KMtWLmZzU pHshQZVzQM7k/6u0yVLvNnSa/zleMW3TjOyKU+NKjRkTYyj8TdE3jp5PAUCzp1UVapTF J7mg== X-Received: by 10.236.148.208 with SMTP id v56mr798045yhj.45.1375133500612; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.134 with SMTP id gu6ls2208227qeb.83.gmail; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) X-Received: by 10.220.203.197 with SMTP id fj5mr9356334vcb.60.1375133500482; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id xk1si2422773vdc.88.2013.07.29.14.31.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 14:31:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ij15so2538856vcb.16 for ; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr9039930vcy.25.1375133500401; Mon, 29 Jul 2013 14:31:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp138459vcb; Mon, 29 Jul 2013 14:31:39 -0700 (PDT) X-Received: by 10.68.239.168 with SMTP id vt8mr32952322pbc.125.1375133499506; Mon, 29 Jul 2013 14:31:39 -0700 (PDT) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id dw1si46678110pbc.36.2013.07.29.14.31.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 14:31:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id md12so5130652pbc.2 for ; Mon, 29 Jul 2013 14:31:39 -0700 (PDT) X-Received: by 10.68.252.71 with SMTP id zq7mr8704862pbc.85.1375133499135; Mon, 29 Jul 2013 14:31:39 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id om2sm21331095pbc.30.2013.07.29.14.31.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 14:31:38 -0700 (PDT) From: John Stultz To: Dhaval Giani Cc: John Stultz Subject: [PATCH 4/7] volatile-test: Drop is_anon flag and extra handling Date: Mon, 29 Jul 2013 14:31:17 -0700 Message-Id: <1375133480-5597-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1375133480-5597-1-git-send-email-john.stultz@linaro.org> References: <1375133480-5597-1-git-send-email-john.stultz@linaro.org> X-Gm-Message-State: ALoCoQmw5KNgY73ZZESf9hvte78rKTdDOHXz7LsjIIckY4tq2nsTENPPNKTnG36Vzvu6nUgQmNbf X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The is_anon bits were originally uses when we didn't have the copy volatile ranges on fork working, so we can drop this COW-breaking code now. Signed-off-by: John Stultz --- volatile-test-signal.c | 10 ---------- volatile-test.c | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/volatile-test-signal.c b/volatile-test-signal.c index df2068f..4434525 100644 --- a/volatile-test-signal.c +++ b/volatile-test-signal.c @@ -43,7 +43,6 @@ static int mnovolatile(void *addr, size_t length, int* purged) char* vaddr; -int is_anon = 0; #define PAGE_SIZE (4*1024) #define CHUNK (4*1024*4) #define CHUNKNUM 26 @@ -60,14 +59,6 @@ void generate_pressure(megs) if (!child) { - if (is_anon) { - /* make sure we write to all the vrange pages - * in order to break the copy-on-write - */ - for(i=0; i < CHUNKNUM; i++) - memset(vaddr + (i*CHUNK), '0', CHUNK); - } - for (i=0; i < megs; i++) { addr = malloc(one_meg); bzero(addr, one_meg); @@ -129,7 +120,6 @@ int main(int argc, char *argv[]) fd = open(file, O_RDWR); vaddr = mmap(0, FULLSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); } else { - is_anon = 1; vaddr = malloc(FULLSIZE); } diff --git a/volatile-test.c b/volatile-test.c index e148e19..153bd6d 100644 --- a/volatile-test.c +++ b/volatile-test.c @@ -42,7 +42,6 @@ static int mnovolatile(void *addr, size_t length, int* purged) char* vaddr; -int is_anon = 0; #define PAGE_SIZE (4*1024) #define CHUNK (4*1024*4) #define CHUNKNUM 26 @@ -59,14 +58,6 @@ void generate_pressure(megs) if (!child) { - if (is_anon) { - /* make sure we write to all the vrange pages - * in order to break the copy-on-write - */ - for(i=0; i < CHUNKNUM; i++) - memset(vaddr + (i*CHUNK), '0', CHUNK); - } - for (i=0; i < megs; i++) { addr = malloc(one_meg); bzero(addr, one_meg); @@ -88,7 +79,6 @@ int main(int argc, char *argv[]) fd = open(file, O_RDWR); vaddr = mmap(0, FULLSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); } else { - is_anon = 1; vaddr = malloc(FULLSIZE); }